dotkernel / api

DotKernel's PSR-7 REST style API built around the Mezzio API skeleton.
https://docs.dotkernel.org/api-documentation/
MIT License
38 stars 5 forks source link

[Insight] Your project should not contain duplicated code - in src/…/AccountResetPasswordHandler.php, line 53 #100

Closed arhimede closed 3 years ago

arhimede commented 3 years ago

in src/User/src/Handler/AccountResetPasswordHandler.php, line 53

The next 21 lines appear both in src/User/src/Handler/AccountResetPasswordHandler.php:53 and src/User/src/Handler/AccountResetPasswordHandler.php:83.


    /**
     * @param ServerRequestInterface $request
     * @return ResponseInterface
     */
    public function get(ServerRequestInterface $request): ResponseInterface
    {
        $hash = $request->getAttribute('hash') ?? null;
        $user = $this->userService->findByResetPasswordHash($hash);
        if (!($user instanceof User)) {
            return $this->notFoundResponse(

Posted from SymfonyInsight