1 | <?php |
||
19 | class RedmineApiClientMock implements RedmineApiClientInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $connectedUser = false; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private $url; |
||
30 | |||
31 | private $usersData = [ |
||
32 | 'test' => [ |
||
33 | 'user' => [ |
||
34 | 'mail' => '[email protected]', |
||
35 | 'login' => 'test', |
||
36 | 'api_key' => 'api-key', |
||
37 | 'password' => 'test', |
||
38 | 'firstname' => 'Te', |
||
39 | 'lastname' => 'St' |
||
40 | ] |
||
41 | ], |
||
42 | 'test-unauthorized' => [ |
||
43 | 'user' => [ |
||
44 | 'mail' => '[email protected]', |
||
45 | 'login' => 'test-unauthorized', |
||
46 | 'api_key' => 'api-key2', |
||
47 | 'password' => 'test', |
||
48 | 'firstname' => 'Te', |
||
49 | 'lastname' => 'St 2' |
||
50 | ] |
||
51 | ] |
||
52 | ]; |
||
53 | |||
54 | private $apiName; |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 8 | public function __construct(string $url) |
|
63 | |||
64 | /** |
||
65 | * Set the Redmine client Class |
||
66 | * |
||
67 | * @param string $clientClass |
||
68 | */ |
||
69 | public function setClientClass(string $clientClass) |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 4 | public function connect(string $login, string $password) |
|
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | 3 | public function api(string $apiName) |
|
99 | |||
100 | /** |
||
101 | * Retrieve current connected user |
||
102 | * |
||
103 | * @return mixed|null |
||
104 | */ |
||
105 | 3 | public function getCurrentUser() |
|
109 | } |
||
110 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..