@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * Create new Firebase client object |
| 86 | 86 | * Remember to install PHP CURL extention |
| 87 | 87 | * |
| 88 | - * @param Config\FirebaseAuth $auth |
|
| 88 | + * @param Authentication\FirebaseAuth $auth |
|
| 89 | 89 | */ |
| 90 | 90 | public function __construct(\ZendFirebase\Authentication\FirebaseAuth $auth) |
| 91 | 91 | { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | /** |
| 115 | 115 | * Controll of all dipendenties |
| 116 | 116 | * |
| 117 | - * @param \ZendFirebase\Config\FirebaseAuth $auth |
|
| 117 | + * @param Authentication\FirebaseAuth $auth |
|
| 118 | 118 | */ |
| 119 | 119 | private function checkDipendenties($auth) |
| 120 | 120 | { |
@@ -122,12 +122,12 @@ discard block |
||
| 122 | 122 | $curlMessage = 'Extension CURL is not loaded or not installed.'; |
| 123 | 123 | |
| 124 | 124 | // check if auth is null |
| 125 | - if (! is_object($auth) || null == $auth) { |
|
| 125 | + if (!is_object($auth) || null == $auth) { |
|
| 126 | 126 | trigger_error($authMessage, E_USER_ERROR); |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | // check if extension is installed |
| 130 | - if (! extension_loaded('curl')) { |
|
| 130 | + if (!extension_loaded('curl')) { |
|
| 131 | 131 | trigger_error($curlMessage, E_USER_ERROR); |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $headers['Content-Type'] = 'application/json'; |
| 189 | 189 | |
| 190 | 190 | // check if header is an array |
| 191 | - if (! is_array($headers)) { |
|
| 191 | + if (!is_array($headers)) { |
|
| 192 | 192 | $str = "The guzzle client headers must be an array."; |
| 193 | 193 | throw new \Exception($str); |
| 194 | 194 | } |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | * |
| 315 | 315 | * @param string $path |
| 316 | 316 | */ |
| 317 | - public function writeRules($path,array $data) |
|
| 317 | + public function writeRules($path, array $data) |
|
| 318 | 318 | { |
| 319 | 319 | $this->writeRequest('put', $this->getJsonPath($path, []), $data); |
| 320 | 320 | } |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | */ |
| 445 | 445 | private function writeEventLogs($logger, $eventData, $event, $path) |
| 446 | 446 | { |
| 447 | - if (! empty($eventData) || null != $eventData) { |
|
| 447 | + if (!empty($eventData) || null != $eventData) { |
|
| 448 | 448 | $logger->addDebug("path: {$path}", [ |
| 449 | 449 | 'DATA' => $eventData, |
| 450 | 450 | 'EVENT TYPE' => $event->getEventType() |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | private function validateOperation() |
| 146 | 146 | { |
| 147 | - if (! is_string($this->getOperation())) { |
|
| 147 | + if (!is_string($this->getOperation())) { |
|
| 148 | 148 | $getOperation = "Operation parameter must be STRING and NOT EMPTY. Received : "; |
| 149 | 149 | $getOperation .= gettype($this->getOperation()) . " ({$this->getOperation()})."; |
| 150 | 150 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | private function validateStatus() |
| 161 | 161 | { |
| 162 | - if (! is_numeric($this->getStatus())) { |
|
| 162 | + if (!is_numeric($this->getStatus())) { |
|
| 163 | 163 | $getStatus = "Status parameter must be NUMERIC. Received : "; |
| 164 | 164 | $getStatus .= gettype($this->getStatus()) . " ({$this->getStatus()})."; |
| 165 | 165 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | */ |
| 175 | 175 | private function validateData() |
| 176 | 176 | { |
| 177 | - if (! is_array($this->getFirebaseData())) { |
|
| 177 | + if (!is_array($this->getFirebaseData())) { |
|
| 178 | 178 | $gettype = "FirebaseData parameter must be ARRAY. Received : " . gettype($this->getFirebaseData()) . "."; |
| 179 | 179 | throw new \Exception($gettype); |
| 180 | 180 | } |
@@ -189,16 +189,16 @@ discard block |
||
| 189 | 189 | { |
| 190 | 190 | switch (json_last_error()) { |
| 191 | 191 | case JSON_ERROR_NONE: |
| 192 | - $jsonValidator = false; |
|
| 192 | + $jsonValidator = false; |
|
| 193 | 193 | break; |
| 194 | 194 | case JSON_ERROR_STATE_MISMATCH: |
| 195 | - $jsonValidator = ' - Underflow or the modes mismatch'; |
|
| 195 | + $jsonValidator = ' - Underflow or the modes mismatch'; |
|
| 196 | 196 | break; |
| 197 | 197 | case JSON_ERROR_SYNTAX: |
| 198 | - $jsonValidator = ' - Syntax error, malformed JSON'; |
|
| 198 | + $jsonValidator = ' - Syntax error, malformed JSON'; |
|
| 199 | 199 | break; |
| 200 | 200 | case JSON_ERROR_UTF8: |
| 201 | - $jsonValidator = ' - Malformed UTF-8 characters, possibly incorrectly encoded'; |
|
| 201 | + $jsonValidator = ' - Malformed UTF-8 characters, possibly incorrectly encoded'; |
|
| 202 | 202 | break; |
| 203 | 203 | } |
| 204 | 204 | |