1 | <?php |
||
16 | class IzbergConnector |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $izbergUrl; |
||
22 | /** |
||
23 | * @var Client |
||
24 | */ |
||
25 | private $httpClient; |
||
26 | /** |
||
27 | * @var \Predis\Client |
||
28 | */ |
||
29 | private $redis; |
||
30 | /** |
||
31 | * @var boolean |
||
32 | */ |
||
33 | private $force = false; |
||
34 | |||
35 | /** |
||
36 | * IzbergConnector constructor. |
||
37 | * @param string $izbergUrl |
||
38 | * @param Client $httpClient |
||
39 | * @param \Predis\Client $redis |
||
40 | */ |
||
41 | public function __construct(string $izbergUrl, Client $httpClient, \Predis\Client $redis) |
||
47 | |||
48 | /** |
||
49 | * @param string $email |
||
50 | * @param string $firstName |
||
51 | * @param string $lastName |
||
52 | * @param string $secretKey |
||
53 | */ |
||
54 | public function connect(string $email = '', string $firstName = '', string $lastName = '', string $secretKey = '') |
||
76 | |||
77 | /** |
||
78 | * @param string $email |
||
79 | * @param string $firstName |
||
80 | * @param string $lastName |
||
81 | * @param string $secretKey |
||
82 | */ |
||
83 | public function forceAuthAndConnect( |
||
92 | |||
93 | /** |
||
94 | * @param string $email |
||
95 | * @param string $firstName |
||
96 | * @param string $lastName |
||
97 | * @param string $secretKey |
||
98 | * @return string |
||
99 | */ |
||
100 | public function generateUrl( |
||
116 | |||
117 | /** |
||
118 | * <<<<<<< HEAD |
||
119 | * @param bool $force |
||
120 | */ |
||
121 | public function setForce(bool $force) |
||
125 | |||
126 | /** |
||
127 | * @return bool |
||
128 | */ |
||
129 | public function getForce():bool |
||
133 | |||
134 | /** |
||
135 | * @param Response $response |
||
136 | */ |
||
137 | public function setAuthentication(Response $response) |
||
144 | |||
145 | /** |
||
146 | * @return array |
||
147 | */ |
||
148 | public function getAuthentication() |
||
152 | } |
||
153 | |||
154 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.