Test Failed
Push — 1.0.0-dev ( c68446...90e1c2 )
by nguereza
02:35
created
core/classes/database/DatabaseCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         public function getCacheContent() {
158 158
             //set some attributes values
159 159
             $this->setPropertiesValues();
160
-            if (! $this->canUseCache()) {
160
+            if (!$this->canUseCache()) {
161 161
                 $this->logger->info('The cache is not enabled for this query or is not a SELECT query'); 
162 162
                 return null;
163 163
             }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         public function saveCacheContent($result) {
179 179
             //set some attributes values
180 180
             $this->setPropertiesValues();
181
-            if (! $this->canUseCache()) {
181
+            if (!$this->canUseCache()) {
182 182
                 $this->logger->info('The cache is not enabled for this query or is not a SELECT query'); 
183 183
                 return null;
184 184
             }
Please login to merge, or discard this patch.
core/libraries/Email.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * SOFTWARE.
29 29
      */
30 30
 
31
-    class Email extends BaseClass{
31
+    class Email extends BaseClass {
32 32
         /**
33 33
          * @var int $wrap
34 34
          */
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
             $message = $this->getWrapMessage();
846 846
             if ($this->hasAttachments()) {
847 847
                 $this->setAttachmentHeaders();
848
-                $message  = $this->assembleAttachmentBody();
848
+                $message = $this->assembleAttachmentBody();
849 849
             }
850 850
             return $message;
851 851
         }
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
                                         $this->getSmtpConfig('connection_timeout', 30)
926 926
                                     );
927 927
 
928
-            if (! is_resource($this->smtpSocket)) {
928
+            if (!is_resource($this->smtpSocket)) {
929 929
                 $this->error = $errorNumber . ': ' . $errorMessage;
930 930
                 return false;
931 931
             }
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
                      */
975 975
                     if (is_resource($this->smtpSocket)) {
976 976
                         $method = STREAM_CRYPTO_METHOD_TLS_CLIENT;
977
-                        if(version_compare(PHP_VERSION, '5.6', '>=')) {
977
+                        if (version_compare(PHP_VERSION, '5.6', '>=')) {
978 978
                             $method = STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
979 979
                         }
980 980
                         stream_socket_enable_crypto($this->smtpSocket, true, $method);
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
                 'To' => $to
1042 1042
             );
1043 1043
             foreach ($additionalHeaders as $key => $value) {
1044
-                if (! isset($this->headers[$key])) {
1044
+                if (!isset($this->headers[$key])) {
1045 1045
                     $this->headers[$key] = $value;
1046 1046
                 }
1047 1047
             }
Please login to merge, or discard this patch.
core/libraries/FormValidation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -443,10 +443,10 @@  discard block
 block discarded – undo
443 443
          * @return object the current instance
444 444
          */
445 445
         protected function filterValidationData() {
446
-            foreach ($this->data as $key => $value ) {
446
+            foreach ($this->data as $key => $value) {
447 447
                 if (is_string($value)) {
448 448
                    $this->data[$key] = trim($value);
449
-                } else if(is_array($value)) {
449
+                } else if (is_array($value)) {
450 450
                     $this->data[$key] = array_map('trim', $value);
451 451
                 }
452 452
             }
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
                                  $rule, 
1162 1162
                                  $paramValue
1163 1163
                              ); 
1164
-            } else{
1164
+            } else {
1165 1165
                 $this->forceError = true;
1166 1166
                 show_error('The callback validation function/method "' . $paramValue . '" does not exist');
1167 1167
             }
Please login to merge, or discard this patch.
core/libraries/Browser.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
          * Reset all properties
145 145
          */
146 146
         public function reset() {
147
-            $this->agent =  get_instance()->globalvar->server('HTTP_USER_AGENT');
147
+            $this->agent = get_instance()->globalvar->server('HTTP_USER_AGENT');
148 148
             $this->browserName = 'unknown';
149 149
             $this->version = 'unknown';
150 150
             $this->platform = 'unknown';
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
          */
251 251
 		protected function checkPlatform() { 
252 252
 			foreach ($this->platforms as $regex => $value) { 
253
-				if (preg_match($regex, $this->agent) ) {
253
+				if (preg_match($regex, $this->agent)) {
254 254
 					$this->platform = $value;
255 255
 					break;
256 256
 				}
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
          */
263 263
 		protected function checkBrowser() {
264 264
 			foreach ($this->browsers as $regex => $value) { 
265
-				if (preg_match($regex, $this->agent ) ) {
265
+				if (preg_match($regex, $this->agent)) {
266 266
 					$this->browserName = $value;
267 267
 					break;
268 268
 				}
@@ -272,10 +272,10 @@  discard block
 block discarded – undo
272 272
 		/**
273 273
          * Routine to determine the browser version
274 274
          */
275
-		protected function checkBrowserVersion(){
275
+		protected function checkBrowserVersion() {
276 276
 			$detected = $this->getBrowser();
277 277
 			$detect = array_search($detected, $this->browsers);
278
-			$browser = str_replace(array('/i','/'), '', $detect);
278
+			$browser = str_replace(array('/i', '/'), '', $detect);
279 279
 			$regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
280 280
 			if (preg_match_all($regex, $this->agent, $matches)) {
281 281
 				$found = array_search($browser, $matches['browser']);
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
          */
289 289
 		protected function checkMobile() {
290 290
 			if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket'
291
-                . '|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->agent) ) {
291
+                . '|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->agent)) {
292 292
 				$this->isMobile = true;
293 293
 			}
294 294
 		}
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
          * Determine if the browser is Tablet or not
298 298
          */
299 299
 		protected function checkTablet() {
300
-			if (preg_match('/tablet|ipad/i', $this->agent) ) {
300
+			if (preg_match('/tablet|ipad/i', $this->agent)) {
301 301
 				$this->isTablet = true;
302 302
 			}
303 303
 		}
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
          * Determine if the browser is Robot or not
307 307
          */
308 308
 		protected function checkBot() {
309
-			if (preg_match('/bot/i', $this->agent) ) {
309
+			if (preg_match('/bot/i', $this->agent)) {
310 310
 				$this->isRobot = true;
311 311
 			}
312 312
 		}
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
             if (stristr($this->agent, 'FacebookExternalHit')) {
319 319
                 $this->isRobot = true;
320 320
                 $this->isFacebook = true;
321
-            }  else if (stristr($this->agent, 'FBIOS')) {
321
+            } else if (stristr($this->agent, 'FBIOS')) {
322 322
                 $this->isFacebook = true;
323 323
             }
324 324
         }
Please login to merge, or discard this patch.