GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 25-27 lines in 2 locations

src/JumpCloud/Operation/Authenticate.php 1 location

@@ 14-38 (lines=25) @@
11
 * Class Authenticate
12
 * @package JumpCloud\Operation
13
 */
14
class Authenticate implements RequestInterface, AuthorizationRequestInterface
15
{
16
    use RequestOperationTrait;
17
18
    /**
19
     * Authenticate constructor.
20
     * @param $username
21
     * @param $password
22
     */
23
    public function __construct($username, $password)
24
    {
25
        $request = new Request();
26
        $request->setBody(
27
            [
28
                'username' => $username,
29
                'password' => $password
30
            ]
31
        );
32
33
        $request->setUri(AuthorizationRequestInterface::ENDPOINT);
34
        $request->setResponseFactory(new AuthorizationResponseFactory());
35
36
        $this->request = $request;
37
    }
38
}
39

src/JumpCloud/Operation/Authorization.php 1 location

@@ 14-40 (lines=27) @@
11
 * Class Authorization
12
 * @package JumpCloud\Operation
13
 */
14
class Authorization implements RequestInterface, AuthorizationRequestInterface
15
{
16
    use RequestOperationTrait;
17
18
    /**
19
     * Authorization constructor.
20
     * @param $username
21
     * @param $password
22
     * @param $tag
23
     */
24
    public function __construct($username, $password, $tag)
25
    {
26
        $request = new Request();
27
        $request->setBody(
28
            [
29
                'username' => $username,
30
                'password' => $password,
31
                'tag' => $tag
32
            ]
33
        );
34
35
        $request->setUri(AuthorizationRequestInterface::ENDPOINT);
36
        $request->setResponseFactory(new AuthorizationResponseFactory());
37
38
        $this->request = $request;
39
    }
40
}
41