Test Failed
Push — 1.0.0-dev ( 72449d...860cec )
by nguereza
02:46
created
core/libraries/Email.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      * @link      http://github.com/eoghanobrien/php-simple-mail
49 49
      */
50 50
 
51
-    class Email extends BaseClass{
51
+    class Email extends BaseClass {
52 52
         /**
53 53
          * @var int $wrap
54 54
          */
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';
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
          */
307 307
 		protected function checkPlatform() { 
308 308
 			foreach ($this->platforms as $regex => $value) { 
309
-				if (preg_match($regex, $this->agent) ) {
309
+				if (preg_match($regex, $this->agent)) {
310 310
 					$this->setPlatform($value);
311 311
 					break;
312 312
 				}
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
          */
319 319
 		protected function checkBrowser() {
320 320
 			foreach ($this->browsers as $regex => $value) { 
321
-				if (preg_match($regex, $this->agent ) ) {
321
+				if (preg_match($regex, $this->agent)) {
322 322
 					$this->setBrowser($value);
323 323
 					break;
324 324
 				}
@@ -328,10 +328,10 @@  discard block
 block discarded – undo
328 328
 		/**
329 329
          * Routine to determine the browser version
330 330
          */
331
-		protected function checkBrowserVersion(){
331
+		protected function checkBrowserVersion() {
332 332
 			$detected = $this->getBrowser();
333 333
 			$detect = array_search($detected, $this->browsers);
334
-			$browser = str_replace(array('/i','/'), '', $detect);
334
+			$browser = str_replace(array('/i', '/'), '', $detect);
335 335
 			$regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i";
336 336
 			if (preg_match_all($regex, $this->agent, $matches)) {
337 337
 				$found = array_search($browser, $matches['browser']);
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
          */
345 345
 		protected function checkMobile() {
346 346
 			if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket'
347
-                . '|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->agent) ) {
347
+                . '|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->agent)) {
348 348
 				$this->setMobile(true);
349 349
 			}
350 350
 		}
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
          * Determine if the browser is Tablet or not
354 354
          */
355 355
 		protected function checkTablet() {
356
-			if (preg_match('/tablet|ipad/i', $this->agent) ) {
356
+			if (preg_match('/tablet|ipad/i', $this->agent)) {
357 357
 				$this->setTablet(true);
358 358
 			}
359 359
 		}
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
          * Determine if the browser is Robot or not
363 363
          */
364 364
 		protected function checkBot() {
365
-			if (preg_match('/bot/i', $this->agent) ) {
365
+			if (preg_match('/bot/i', $this->agent)) {
366 366
 				$this->setRobot(true);
367 367
 			}
368 368
 		}
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
             if (stristr($this->agent, 'FacebookExternalHit')) {
375 375
                 $this->setRobot(true);
376 376
                 $this->setFacebook(true);
377
-            }  else if (stristr($this->agent, 'FBIOS')) {
377
+            } else if (stristr($this->agent, 'FBIOS')) {
378 378
                 $this->setFacebook(true);
379 379
             }
380 380
         }
Please login to merge, or discard this patch.
core/libraries/Upload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
          *
284 284
          * @return object the current instance
285 285
          */
286
-        public function setUploadedFileData(array $fileData){
286
+        public function setUploadedFileData(array $fileData) {
287 287
             $this->uploadedFileData = $fileData;
288 288
             return $this;
289 289
         }
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
          *    @return    boolean
527 527
          */
528 528
         public function isAllowOverwriting() {
529
-            return $this->overwriteFile ;
529
+            return $this->overwriteFile;
530 530
         }
531 531
 
532 532
         /**
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
          *    @return    string
566 566
          */
567 567
         public function getDestinationDirectory() {
568
-            return $this->destinationDirectory ;
568
+            return $this->destinationDirectory;
569 569
         }
570 570
 
571 571
         /**
Please login to merge, or discard this patch.
core/classes/DBSessionHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@
 block discarded – undo
318 318
          * Get some parameters data need like ip address, hostname, browser info, etc.
319 319
          * @return array
320 320
          */
321
-        protected function getSessionDataParams(){
321
+        protected function getSessionDataParams() {
322 322
             $this->OBJ->loader->functions('user_agent'); 
323 323
             $this->OBJ->loader->library('Browser'); 
324 324
             
Please login to merge, or discard this patch.
core/classes/model/Model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
          * 
824 824
          * @return string|boolean
825 825
          */
826
-        protected function getReturnType(){
826
+        protected function getReturnType() {
827 827
             $type = false;
828 828
             if ($this->temporaryReturnRecordType == 'array') {
829 829
                $type = 'array';
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
          * Check if soft delete is enable setting the condition
836 836
          * @return object the current instance 
837 837
          */
838
-        protected function checkForSoftDelete(){
838
+        protected function checkForSoftDelete() {
839 839
             if ($this->softDeleteStatus && $this->returnRecordWithDeleted !== true) {
840 840
                 $this->getQueryBuilder()->where(
841 841
                                                 $this->softDeleteTableColumn, 
@@ -855,11 +855,11 @@  discard block
 block discarded – undo
855 855
          * 
856 856
          * @return array|object the final row values
857 857
          */
858
-        protected function relateOneToManyAndManyToOne($relationship, $options, $row, $type){
858
+        protected function relateOneToManyAndManyToOne($relationship, $options, $row, $type) {
859 859
             if (in_array($relationship, $this->withs)) {
860 860
                 get_instance()->loader->model($options['model'], $relationship . '_model');
861 861
                 $model = get_instance()->{$relationship . '_model'};
862
-                if($type == 'manyToOne'){
862
+                if ($type == 'manyToOne') {
863 863
                     if (is_object($row)) {
864 864
                         $row->{$relationship} = $model->getSingleRecord($row->{$options['primary_key']});
865 865
                     } else {
@@ -969,7 +969,7 @@  discard block
 block discarded – undo
969 969
                 } else {
970 970
                     if (is_int($field)) {
971 971
                         //Condition like xxxx->getListRecordCond(array('id'));
972
-                        $this->getQueryBuilder()->where($value);  // WHERE id = ''
972
+                        $this->getQueryBuilder()->where($value); // WHERE id = ''
973 973
                     } else {
974 974
                         //Condition like xxxx->getListRecordCond(array('status' => 0));
975 975
                         $this->getQueryBuilder()->where($field, $value); // WHERE status = 0
Please login to merge, or discard this patch.
core/classes/database/DatabaseConnection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
                     PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ
126 126
                 );
127 127
                 $this->pdo = new PDO($this->getDsnValue(), $this->getUsername(), $this->getPassword(), $options);
128
-                if($this->getDriver() == 'mysql') {
128
+                if ($this->getDriver() == 'mysql') {
129 129
                     $this->pdo->exec("SET NAMES '" . $this->getCharset() . "' COLLATE '" . $this->getCollation() . "'");
130 130
                     $this->pdo->exec("SET CHARACTER SET '" . $this->getCharset() . "'");
131 131
                 }
Please login to merge, or discard this patch.
core/classes/Response.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
             $cacheInfo = $cache->getInfo($pageCacheKey);
250 250
             if ($cacheInfo) {
251 251
                 $status = $this->sendCacheNotYetExpireInfoToBrowser($cacheInfo);
252
-                if($status === false) {
252
+                if ($status === false) {
253 253
                     return $this->sendCachePageContentToBrowser($cache);
254 254
                 }
255 255
                 return true;
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
          */
324 324
         public function sendError(array $data = array()) {
325 325
             $path = CORE_VIEWS_PATH . 'errors.php';
326
-            if(file_exists($path)){
326
+            if (file_exists($path)) {
327 327
                 //compress the output if is available
328 328
                 $compressOutputHandler = $this->getCompressOutputHandler();
329 329
                 ob_start($compressOutputHandler);
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
                 echo $content;
336 336
             }
337 337
             //@codeCoverageIgnoreStart
338
-            else{
338
+            else {
339 339
                 //can't use show_error() at this time because 
340 340
                 //some dependencies not yet loaded
341 341
                 set_http_status_header(503);
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
          * 
390 390
          * @return string|null          the full file path
391 391
          */
392
-        protected function getDefaultFilePathForView($file){
392
+        protected function getDefaultFilePathForView($file) {
393 393
             $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH);
394 394
             $fullFilePath = null;
395 395
             foreach ($searchDir as $dir) {
Please login to merge, or discard this patch.