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.
Completed
Push — place-services ( 94b48b...a9c14c )
by Eric
67:56 queued 04:38
created

AbstractHttpService::setClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\GoogleMap\Service;
13
14
use Http\Client\HttpClient;
15
use Http\Message\MessageFactory;
16
use Psr\Http\Message\RequestInterface as PsrRequestInterface;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21
abstract class AbstractHttpService extends AbstractService
22
{
23
    /**
24
     * @var HttpClient
25
     */
26
    private $client;
27
28
    /**
29
     * @var MessageFactory
30
     */
31
    private $messageFactory;
32
33
    /**
34
     * @param string         $url
35
     * @param HttpClient     $client
36
     * @param MessageFactory $messageFactory
37
     */
38
    public function __construct($url, HttpClient $client, MessageFactory $messageFactory)
39
    {
40
        parent::__construct($url);
41
42
        $this->setClient($client);
43
        $this->setMessageFactory($messageFactory);
44
    }
45
46
    /**
47
     * @return HttpClient
48
     */
49
    public function getClient()
50
    {
51
        return $this->client;
52
    }
53
54
    /**
55
     * @param HttpClient $client
56
     */
57
    public function setClient(HttpClient $client)
58
    {
59
        $this->client = $client;
60
    }
61
62
    /**
63
     * @return MessageFactory
64
     */
65
    public function getMessageFactory()
66
    {
67
        return $this->messageFactory;
68
    }
69
70
    /**
71
     * @param MessageFactory $messageFactory
72
     */
73
    public function setMessageFactory(MessageFactory $messageFactory)
74
    {
75
        $this->messageFactory = $messageFactory;
76
    }
77
78
    /**
79
     * @param RequestInterface $request
80
     *
81
     * @return PsrRequestInterface
82
     */
83
    protected function createRequest(RequestInterface $request)
84
    {
85
        return $this->messageFactory->createRequest('GET', $this->createUrl($request));
86
    }
87
}
88