Test Failed
Push — 1.0.0-dev ( 49bbbd...877729 )
by nguereza
02:45
created
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.
core/libraries/FormValidation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -425,10 +425,10 @@  discard block
 block discarded – undo
425 425
          * @return object the current instance
426 426
          */
427 427
         protected function filterValidationData() {
428
-            foreach ($this->data as $key => $value ) {
428
+            foreach ($this->data as $key => $value) {
429 429
                 if (is_string($value)) {
430 430
                    $this->data[$key] = trim($value);
431
-                } else if(is_array($value)) {
431
+                } else if (is_array($value)) {
432 432
                     $this->data[$key] = array_map('trim', $value);
433 433
                 }
434 434
             }
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
                 if (call_user_func_array($paramValue, array($value)) === false) {
1038 1038
                     $this->setFieldErrorWithRequiredCheck($field, $value, $rule, $paramValue);
1039 1039
                 }
1040
-            } else{
1040
+            } else {
1041 1041
                 $this->forceError = true;
1042 1042
                 show_error('The callback validation function/method "' . $paramValue . '" does not exist');
1043 1043
             }
Please login to merge, or discard this patch.
core/classes/database/DatabaseQueryRunner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             //reset instance
101 101
             $this->reset();
102 102
 
103
-            $this->logger->debug('Begin execution of SQL query [' . $this->query .']');
103
+            $this->logger->debug('Begin execution of SQL query [' . $this->query . ']');
104 104
            
105 105
             //for database query execution time
106 106
             $benchmarkMarkerKey = $this->getBenchmarkKey();
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             if ((double) $responseTime >= 1.000000) {
118 118
                 $this->logger->warning(
119 119
                                         'High response time while processing database query [' . $this->query . '].' 
120
-                                        . 'The response time is [' .$responseTime . '] sec.'
120
+                                        . 'The response time is [' . $responseTime . '] sec.'
121 121
                                         );
122 122
             }
123 123
     		
Please login to merge, or discard this patch.
core/classes/Log.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@
 block discarded – undo
214 214
         protected function getLogDebugBacktraceInfo() {
215 215
             $dtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
216 216
             $i = 0;
217
-            while ($dtrace[$i]['file'] == __FILE__ ) {
217
+            while ($dtrace[$i]['file'] == __FILE__) {
218 218
                 $i++;
219 219
             } 
220 220
             $fileInfo = $dtrace[$i];
Please login to merge, or discard this patch.
core/classes/database/DatabaseQueryBuilder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
             $keysList = array();
415 415
             foreach ($keys as $k => $v) {
416 416
                 $v = $this->checkForNullValue($v);
417
-                if (! is_numeric($v)) {
417
+                if (!is_numeric($v)) {
418 418
                     $v = $this->connection->escape($v, $escape);
419 419
                 }
420 420
                 $keysList[] = $v;
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
          * 
728 728
          * @return string|null
729 729
          */
730
-         protected function buildQueryPart($property, $command = ''){
730
+         protected function buildQueryPart($property, $command = '') {
731 731
             if (!empty($this->{$property})) {
732 732
                 return $command . $this->{$property};
733 733
             }
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
          * @param string $clause the clause type "IS NULL", "IS NOT NULLs"
743 743
          * @return object        the current DatabaseQueryBuilder instance
744 744
          */
745
-        protected function whereIsNullAndNotNull($field, $andOr = 'AND', $clause = 'IS NULL'){
745
+        protected function whereIsNullAndNotNull($field, $andOr = 'AND', $clause = 'IS NULL') {
746 746
             if (is_array($field)) {
747 747
                 foreach ($field as $f) {
748 748
                     $this->whereIsNullAndNotNull($f, $andOr, $clause);
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
          *
761 761
          * @return object the current instance
762 762
          */
763
-        protected function setSelectStr($newSelect){
763
+        protected function setSelectStr($newSelect) {
764 764
             $this->select = (($this->select == '*' || empty($this->select)) 
765 765
                                     ? $newSelect 
766 766
                                     : $this->select . ', ' . $newSelect);
@@ -774,8 +774,8 @@  discard block
 block discarded – undo
774 774
          * @return string        the empty string if the value is null
775 775
          * otherwise the same value will be returned
776 776
          */
777
-        protected function checkForNullValue($value){
778
-            if(is_null($value)){
777
+        protected function checkForNullValue($value) {
778
+            if (is_null($value)) {
779 779
                 return '';
780 780
             }
781 781
             return $value;
Please login to merge, or discard this patch.
core/classes/Router.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
          * Remove the DOCUMENT_ROOT and front controller from segments if exists
451 451
          * @return void
452 452
          */
453
-        protected function removeDocumentRootFrontControllerFromSegments(){
453
+        protected function removeDocumentRootFrontControllerFromSegments() {
454 454
             $segment = $this->segments;
455 455
             $globals = & class_loader('GlobalVar', 'classes');
456 456
             $rootFolder = substr($globals->server('SCRIPT_NAME'), 0, strpos(
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
                     break;
582 582
                 }
583 583
             }
584
-            if($findIndex !== -1){
584
+            if ($findIndex !== -1) {
585 585
                 //$args[0] => full string captured by preg_match
586 586
                 //$args[1], $args[2], $args[n] => contains the value of 
587 587
                 //(:num), (:alpha), (:alnum), (:any)
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
          * Find file path of the current controller using the current module
607 607
          * @return boolean true if the file path is found otherwise false.
608 608
          */
609
-        protected function findControllerFullPathUsingCurrentModule(){
609
+        protected function findControllerFullPathUsingCurrentModule() {
610 610
             $path = $this->moduleInstance->findControllerFullPath(ucfirst($this->controller), $this->module);
611 611
             if (!$path) {
612 612
                 $this->logger->info('The controller [' . $this->controller . '] not ' 
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
          * or the current request does not use module
624 624
          * @return void
625 625
          */
626
-        protected function setRouteParamsIfNoModuleOrNotFound(){
626
+        protected function setRouteParamsIfNoModuleOrNotFound() {
627 627
             $segment = $this->segments;
628 628
             //controller
629 629
             if (isset($segment[0])) {
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
          * or the current request use module
645 645
          * @return void
646 646
          */
647
-        protected function setRouteParamsIfAppHasModuleOrFound(){
647
+        protected function setRouteParamsIfAppHasModuleOrFound() {
648 648
             //get the module list
649 649
             $modules = $this->moduleInstance->getModuleList();
650 650
             $segment = $this->segments;
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
                     $this->controller = $segment[0];
658 658
 
659 659
                     //check if the request use the same module name and controller
660
-                    if($this->findControllerFullPathUsingCurrentModule()){
660
+                    if ($this->findControllerFullPathUsingCurrentModule()) {
661 661
                         array_shift($segment);
662 662
                     }
663 663
                 }
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
          */
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
             $message = $this->getWrapMessage();
979 979
             if ($this->hasAttachments()) {
980 980
                 $this->setAttachmentHeaders();
981
-                $message  = $this->assembleAttachmentBody();
981
+                $message = $this->assembleAttachmentBody();
982 982
             }
983 983
             return $message;
984 984
         }
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
                                         $this->smtpConnectionTimeout
1069 1069
                                     );
1070 1070
 
1071
-            if (! is_resource($this->smtpSocket)) {
1071
+            if (!is_resource($this->smtpSocket)) {
1072 1072
                 $this->error = $errorNumber . ':' . $errorMessage;
1073 1073
                 return false;
1074 1074
             }
@@ -1116,7 +1116,7 @@  discard block
 block discarded – undo
1116 1116
                      * We want the negotiation, so we'll force it below ...
1117 1117
                      */
1118 1118
                     $method = STREAM_CRYPTO_METHOD_TLS_CLIENT;
1119
-                    if(version_compare(PHP_VERSION, '5.6', '>=')) {
1119
+                    if (version_compare(PHP_VERSION, '5.6', '>=')) {
1120 1120
                         $method = STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
1121 1121
                     }
1122 1122
                     stream_socket_enable_crypto($this->smtpSocket, true, $method);
@@ -1182,7 +1182,7 @@  discard block
 block discarded – undo
1182 1182
                 'To' => $to
1183 1183
             );
1184 1184
             foreach ($additionalHeaders as $key => $value) {
1185
-                if (! isset($this->headers[$key])) {
1185
+                if (!isset($this->headers[$key])) {
1186 1186
                     $this->headers[$key] = $value;
1187 1187
                 }
1188 1188
             }
Please login to merge, or discard this patch.