1 | <?php |
||
31 | final class XApiClientBuilder implements XApiClientBuilderInterface |
||
32 | { |
||
33 | /** |
||
34 | * @var HttpClient|null |
||
35 | */ |
||
36 | private $httpClient; |
||
37 | |||
38 | /** |
||
39 | * @var RequestFactory|null |
||
40 | */ |
||
41 | private $requestFactory; |
||
42 | |||
43 | private $baseUrl; |
||
44 | private $version; |
||
45 | private $username; |
||
46 | private $password; |
||
47 | private $oAuthCredentials; |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function setHttpClient(HttpClient $httpClient) |
||
53 | { |
||
54 | $this->httpClient = $httpClient; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function setRequestFactory(RequestFactory $requestFactory) |
||
61 | { |
||
62 | $this->requestFactory = $requestFactory; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * {@inheritDoc} |
||
67 | */ |
||
68 | public function setBaseUrl($baseUrl) |
||
69 | { |
||
70 | $this->baseUrl = $baseUrl; |
||
71 | |||
72 | return $this; |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * {@inheritDoc} |
||
77 | */ |
||
78 | public function setVersion($version) |
||
84 | |||
85 | /** |
||
86 | * {@inheritDoc} |
||
87 | */ |
||
88 | public function setAuth($username, $password) |
||
95 | |||
96 | /** |
||
97 | * {@inheritDoc} |
||
98 | */ |
||
99 | public function setOAuthCredentials($consumerKey, $consumerSecret, $token, $tokenSecret) |
||
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | public function build() |
||
133 | } |
||
134 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.