Code Duplication    Length = 13-13 lines in 2 locations

src/Package/PassportController.php 2 locations

@@ 45-57 (lines=13) @@
42
     *
43
     * @return ResponseInterface
44
     */
45
    public static function authorize(
46
        array $routeParams,
47
        ContainerInterface $container,
48
        ServerRequestInterface $request
49
    ): ResponseInterface {
50
        assert($routeParams !== null && $request !== null);
51
52
        /** @var PassportServerInterface $passportServer */
53
        $passportServer = $container->get(PassportServerInterface::class);
54
        $tokenResponse  = $passportServer->getCreateAuthorization($request);
55
56
        return $tokenResponse;
57
    }
58
59
    /**
60
     * @param array                  $routeParams
@@ 66-78 (lines=13) @@
63
     *
64
     * @return ResponseInterface
65
     */
66
    public static function token(
67
        array $routeParams,
68
        ContainerInterface $container,
69
        ServerRequestInterface $request
70
    ): ResponseInterface {
71
        assert($routeParams !== null && $request !== null);
72
73
        /** @var PassportServerInterface $passportServer */
74
        $passportServer = $container->get(PassportServerInterface::class);
75
        $tokenResponse  = $passportServer->postCreateToken($request);
76
77
        return $tokenResponse;
78
    }
79
}
80