1 | <?php |
||
24 | class ClientUtility implements SingletonInterface |
||
25 | { |
||
26 | const AUTHORIZATION_ENDPOINT = 'https://api.hubic.com/oauth/auth/'; |
||
27 | |||
28 | const TOKEN_ENDPOINT = 'https://api.hubic.com/oauth/token/'; |
||
29 | |||
30 | const DOMAIN_API = 'https://api.hubic.com/'; |
||
31 | |||
32 | const VERSION_API = '1.0'; |
||
33 | |||
34 | /** |
||
35 | * @var \Filoucrackeur\Hubic\Service\OAuth2\Client |
||
36 | */ |
||
37 | protected $OAuth; |
||
38 | |||
39 | /** |
||
40 | * @var \TYPO3\CMS\Extbase\Object\ObjectManager |
||
41 | * @inject |
||
42 | */ |
||
43 | protected $objectManager; |
||
44 | |||
45 | /** |
||
46 | * @var \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager |
||
47 | * @inject |
||
48 | */ |
||
49 | protected $persistenceManager; |
||
50 | |||
51 | /** |
||
52 | * @var \Filoucrackeur\Hubic\Domain\Model\Account |
||
53 | * @inject |
||
54 | */ |
||
55 | protected $account; |
||
56 | |||
57 | /** |
||
58 | * @param Account $account |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function callHubic(Account $account) { |
||
93 | |||
94 | public function getAccount() |
||
99 | |||
100 | public function getRedirectUri(Account $account) |
||
116 | |||
117 | public function getAuthorizationRequestUrl(Account $account) |
||
123 | |||
124 | /** |
||
125 | * Get hubiC account Quota |
||
126 | * |
||
127 | * @see https://api.hubic.com/console/ |
||
128 | * @return array |
||
129 | */ |
||
130 | public function getAccountQuota() |
||
135 | |||
136 | /** |
||
137 | * Get hubiC agreements |
||
138 | * |
||
139 | * @see https://api.hubic.com/console/ |
||
140 | * @return array |
||
141 | */ |
||
142 | public function getAgreement() |
||
147 | |||
148 | /** |
||
149 | * Get hubiC getAllLinks |
||
150 | * |
||
151 | * @see https://api.hubic.com/console/ |
||
152 | * @return array |
||
153 | */ |
||
154 | public function getAllLinks() |
||
159 | |||
160 | /** |
||
161 | * @param Account $account |
||
162 | */ |
||
163 | public function setAccount(Account $account) |
||
167 | |||
168 | } |
||
169 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.