Completed
Branch master (b62fb8)
by Ventimiglia
06:10
created
src/Firebase.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.
src/FirebaseResponce.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         
Please login to merge, or discard this patch.