Test Failed
Push — develop ( a526c9...c737cc )
by nguereza
02:56
created
core/classes/Controller.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
          *
94 94
          * @codeCoverageIgnore
95 95
          */
96
-         private function startAppSession() {
96
+            private function startAppSession() {
97 97
             //$_SESSION is not available on cli mode 
98 98
             if (!IS_CLI) {
99 99
                 //set session params
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
          * @codeCoverageIgnore
144 144
          */
145 145
         private function setAppSessionConfig() {
146
-             //the default is to store in the files
146
+                //the default is to store in the files
147 147
             $sessionHandler = $this->config->get('session_handler', 'files');
148 148
             $this->logger->info('Session handler: ' . $sessionHandler);
149 149
             if ($sessionHandler == 'files') {
Please login to merge, or discard this patch.
core/classes/model/Model.php 2 patches
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.
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     class Model {
32 32
 
33
-       /**
33
+        /**
34 34
          * This model's default database table. 
35 35
          * @var string the name of table
36 36
          */
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
             if ($db !== null) {
174 174
                 $this->setDb($db);
175 175
             } else {
176
-                 /**
177
-                 * NOTE: Need use "clone" because some Model need have the personal instance of the database library
178
-                 * to prevent duplication
179
-                 */
180
-                 $obj = & get_instance();
181
-                 $this->setDb(clone $obj->database);
176
+                    /**
177
+                     * NOTE: Need use "clone" because some Model need have the personal instance of the database library
178
+                     * to prevent duplication
179
+                     */
180
+                    $obj = & get_instance();
181
+                    $this->setDb(clone $obj->database);
182 182
             }
183 183
             array_unshift($this->beforeCreateCallbacks, 'removeProtectedTableColumns');
184 184
             array_unshift($this->beforeUpdateCallbacks, 'removeProtectedTableColumns');
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
          * Only get deleted rows on the next call
593 593
          * 
594 594
          * @return object the current instance
595
-        */
595
+         */
596 596
         public function onlyRecordDeleted() {
597 597
             $this->returnOnlyRecordDeleted = true;
598 598
             return $this;
@@ -686,8 +686,8 @@  discard block
 block discarded – undo
686 686
          * @return array the data after add field for updated time
687 687
          */
688 688
         protected function updatedAt($row) {
689
-           $row['updated_at'] = date('Y-m-d H:i:s');
690
-           return $row;
689
+            $row['updated_at'] = date('Y-m-d H:i:s');
690
+            return $row;
691 691
         }
692 692
 
693 693
         /**
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
          */
733 733
         protected function removeProtectedTableColumns($row) {
734 734
             foreach ($this->protectedTableColumns as $attr) {
735
-               if (isset($row[$attr])) {
735
+                if (isset($row[$attr])) {
736 736
                     unset($row[$attr]);
737 737
                 }
738 738
             }
@@ -787,23 +787,23 @@  discard block
 block discarded – undo
787 787
             return false;
788 788
         }
789 789
 
790
-         /**
791
-         * Get the record return type array or object
792
-         * 
793
-         * @return string|boolean
794
-         */
790
+            /**
791
+             * Get the record return type array or object
792
+             * 
793
+             * @return string|boolean
794
+             */
795 795
         protected function getReturnType(){
796 796
             $type = false;
797 797
             if ($this->temporaryReturnRecordType == 'array') {
798
-               $type = 'array';
798
+                $type = 'array';
799 799
             }
800 800
             return $type;
801 801
         }
802 802
 
803
-         /**
804
-         * Check if soft delete is enable setting the condition
805
-         * @return object the current instance 
806
-         */
803
+            /**
804
+             * Check if soft delete is enable setting the condition
805
+             * @return object the current instance 
806
+             */
807 807
         protected function checkForSoftDelete(){
808 808
             if ($this->softDeleteStatus && $this->returnRecordWithDeleted !== true) {
809 809
                 $this->getQueryBuilder()->where(
@@ -814,16 +814,16 @@  discard block
 block discarded – undo
814 814
             return $this;
815 815
         }
816 816
 
817
-         /**
818
-         * Relate for "manyToOne" and "oneToMany"
819
-         * 
820
-         * @param  string $relationship the name of relation
821
-         * @param  string|array $options      the model and primary key values
822
-         * @param  object|array $row          the row to update
823
-         * @param  string $type the type can be "manyToOne", "oneToMany"
824
-         * 
825
-         * @return array|object the final row values
826
-         */
817
+            /**
818
+             * Relate for "manyToOne" and "oneToMany"
819
+             * 
820
+             * @param  string $relationship the name of relation
821
+             * @param  string|array $options      the model and primary key values
822
+             * @param  object|array $row          the row to update
823
+             * @param  string $type the type can be "manyToOne", "oneToMany"
824
+             * 
825
+             * @return array|object the final row values
826
+             */
827 827
         protected function relateOneToManyAndManyToOne($relationship, $options, $row, $type){
828 828
             if (in_array($relationship, $this->withs)) {
829 829
                 get_instance()->loader->model($options['model'], $relationship . '_model');
Please login to merge, or discard this patch.
core/classes/database/Database.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
          */
112 112
         public function __construct(DatabaseConnection $connection = null) {
113 113
             parent::__construct();
114
-    		if ($connection !== null) {
114
+            if ($connection !== null) {
115 115
                 $this->connection = $connection;
116 116
             } 
117 117
         }
@@ -385,9 +385,9 @@  discard block
 block discarded – undo
385 385
                 $this->queryCount++;
386 386
                 
387 387
                 $queryResult = $this->queryRunner->setQuery($query)
388
-                                                 ->setReturnType($returnAsList)
389
-                                                 ->setReturnAsArray($returnAsArray)
390
-                                                 ->execute();
388
+                                                    ->setReturnType($returnAsList)
389
+                                                    ->setReturnAsArray($returnAsArray)
390
+                                                    ->execute();
391 391
 
392 392
                 if (is_object($queryResult)) {
393 393
                     $this->result  = $queryResult->getResult();
Please login to merge, or discard this patch.
core/classes/Response.php 2 patches
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.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                 $this->logger->info('Cannot find view [' . $view . '] in module [' . $module . '] '
211 211
                                     . 'using the default location');
212 212
             }
213
-	    if (!$path) {
213
+        if (!$path) {
214 214
                 $path = $this->getDefaultFilePathForView($viewFile);
215 215
             }
216 216
             $this->logger->info('The view file path to be loaded is [' . $path . ']');
@@ -286,12 +286,12 @@  discard block
 block discarded – undo
286 286
             return $this->finalPageContent;
287 287
         }
288 288
 
289
-         /**
290
-         * Set the final page to be rendered
291
-         * @param string $finalPage the content of the final page
292
-         * 
293
-         * @return object
294
-         */
289
+            /**
290
+             * Set the final page to be rendered
291
+             * @param string $finalPage the content of the final page
292
+             * 
293
+             * @return object
294
+             */
295 295
         public function setFinalPageContent($finalPage) {
296 296
             $this->finalPageContent = $finalPage;
297 297
             return $this;
@@ -366,12 +366,12 @@  discard block
 block discarded – undo
366 366
             //@codeCoverageIgnoreEnd
367 367
         }
368 368
 
369
-         /**
370
-         * Dispatch the FINAL_VIEW_READY event
371
-         *             
372
-         * @return string|null the final view content after processing by each listener
373
-         * if they exists otherwise the same content will be returned
374
-         */
369
+            /**
370
+             * Dispatch the FINAL_VIEW_READY event
371
+             *             
372
+             * @return string|null the final view content after processing by each listener
373
+             * if they exists otherwise the same content will be returned
374
+             */
375 375
         protected function dispatchFinalViewEvent() {
376 376
             //dispatch
377 377
             $event = get_instance()->eventdispatcher->dispatch(
@@ -415,12 +415,12 @@  discard block
 block discarded – undo
415 415
                                           && (bool) ini_get('zlib.output_compression') === false;
416 416
         }
417 417
 
418
-         /**
419
-         * Return the default full file path for view
420
-         * @param  string $file    the filename
421
-         * 
422
-         * @return string|null          the full file path
423
-         */
418
+            /**
419
+             * Return the default full file path for view
420
+             * @param  string $file    the filename
421
+             * 
422
+             * @return string|null          the full file path
423
+             */
424 424
         protected function getDefaultFilePathForView($file){
425 425
             $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH);
426 426
             $fullFilePath = null;
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                 $headerModifiedSince = $globals->server('HTTP_IF_MODIFIED_SINCE');
454 454
                 if (!empty($headerModifiedSince) && $lastModified <= strtotime($headerModifiedSince)) {
455 455
                     $this->logger->info('The cache page content is not yet expire for the '
456
-                                         . 'URL [' . $this->currentUrl . '] send 304 header to browser');
456
+                                            . 'URL [' . $this->currentUrl . '] send 304 header to browser');
457 457
                     $this->setStatus(304);
458 458
                     $this->sendHeaders();
459 459
                     return true;
@@ -469,8 +469,8 @@  discard block
 block discarded – undo
469 469
          */
470 470
         protected function sendCachePageContentToBrowser(&$cache) {
471 471
             $this->logger->info('The cache page content is expired or the browser does '
472
-                 . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] '
473
-                 . 'send cache headers to tell the browser');
472
+                    . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] '
473
+                    . 'send cache headers to tell the browser');
474 474
             $this->sendHeaders();
475 475
             //current page cache key
476 476
             $pageCacheKey = $this->currentUrlCacheKey;
@@ -609,18 +609,18 @@  discard block
 block discarded – undo
609 609
             }
610 610
         }
611 611
 
612
-         /**
613
-         * Set the mandory headers, like security, etc.
614
-         */
612
+            /**
613
+             * Set the mandory headers, like security, etc.
614
+             */
615 615
         protected function setRequiredHeaders() {
616 616
             $requiredHeaders = array(
617 617
                                 'X-XSS-Protection' => '1; mode=block',
618 618
                                 'X-Frame-Options'  => 'SAMEORIGIN'
619 619
                             );
620 620
             foreach ($requiredHeaders as $key => $value) {
621
-               if (!isset($this->headers[$key])) {
621
+                if (!isset($this->headers[$key])) {
622 622
                     $this->headers[$key] = $value;
623
-               } 
623
+                } 
624 624
             }
625 625
         }
626 626
     }
Please login to merge, or discard this patch.
app/config/config.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -134,26 +134,26 @@  discard block
 block discarded – undo
134 134
 	*/
135 135
 	
136 136
     /** 
137
-    * The log level
138
-    *
139
-    * The valid log level are: OFF, NONE, DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY
140
-    *
141
-    * 'OFF' or 'NONE' = do not save log
142
-    * 'EMERGENCY' = enable log for emergency level and above (EMERGENCY)
143
-    * 'ALERT' = enable log for alert level and above (ALERT, EMERGENCY)
144
-    * 'CRITICAL' = enable log for critical level and above (CRITICAL, ALERT, EMERGENCY)
145
-    * 'ERROR' = enable log for error level and above (ERROR, CRITICAL, ALERT, EMERGENCY)
146
-    * 'WARNING' = enable log for warning level and above (WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
147
-    * 'NOTICE' = enable log for notice level and above (NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
148
-    * 'INFO' = enable log for info level and above (INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
149
-    * 'DEBUG' = enable log for debug level and above (DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
150
-    *
151
-    * The default value is NONE if the config value is: null, '', 0, false
152
-    * 
153
-    * Note: in production environment it's recommand to set the log level to 'WARNING' or 'ERROR' if not, in small
154
-    * time the log file size will increase very fast and will cost the application performance
155
-    * and also the filesystem usage of your server.
156
-    */
137
+     * The log level
138
+     *
139
+     * The valid log level are: OFF, NONE, DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY
140
+     *
141
+     * 'OFF' or 'NONE' = do not save log
142
+     * 'EMERGENCY' = enable log for emergency level and above (EMERGENCY)
143
+     * 'ALERT' = enable log for alert level and above (ALERT, EMERGENCY)
144
+     * 'CRITICAL' = enable log for critical level and above (CRITICAL, ALERT, EMERGENCY)
145
+     * 'ERROR' = enable log for error level and above (ERROR, CRITICAL, ALERT, EMERGENCY)
146
+     * 'WARNING' = enable log for warning level and above (WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
147
+     * 'NOTICE' = enable log for notice level and above (NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
148
+     * 'INFO' = enable log for info level and above (INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
149
+     * 'DEBUG' = enable log for debug level and above (DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
150
+     *
151
+     * The default value is NONE if the config value is: null, '', 0, false
152
+     * 
153
+     * Note: in production environment it's recommand to set the log level to 'WARNING' or 'ERROR' if not, in small
154
+     * time the log file size will increase very fast and will cost the application performance
155
+     * and also the filesystem usage of your server.
156
+     */
157 157
     $config['log_level'] = 'NONE';
158 158
 
159 159
 
@@ -180,20 +180,20 @@  discard block
 block discarded – undo
180 180
     $config['log_logger_name'] = array();
181 181
 
182 182
     /**
183
-    * The logger name custom level to use for the log
184
-    * 
185
-    * If this config is set so means the logger level will be used to overwrite 
186
-    * the default log level configuration above. 
187
-    *
188
-    * Example:
189
-    * $config['log_logger_name_level'] = array('MY_LOGGER1' => 'WARNING'); 
190
-    * So if $config['log_level'] = 'ERROR' but all log messages with "MY_LOGGER1" as logger name
191
-    *  will be saved for WARNING message and above
192
-    *  Note: You can also use an regular expression for the logger name.
193
-    *  Example:
194
-    *  $config['log_logger_name_level'] = array('^Class::Con(.*)' => 'info');
195
-    *  So all logger name like "Class::Config", "Class::Cookie", etc. will be match
196
-    */  
183
+     * The logger name custom level to use for the log
184
+     * 
185
+     * If this config is set so means the logger level will be used to overwrite 
186
+     * the default log level configuration above. 
187
+     *
188
+     * Example:
189
+     * $config['log_logger_name_level'] = array('MY_LOGGER1' => 'WARNING'); 
190
+     * So if $config['log_level'] = 'ERROR' but all log messages with "MY_LOGGER1" as logger name
191
+     *  will be saved for WARNING message and above
192
+     *  Note: You can also use an regular expression for the logger name.
193
+     *  Example:
194
+     *  $config['log_logger_name_level'] = array('^Class::Con(.*)' => 'info');
195
+     *  So all logger name like "Class::Config", "Class::Cookie", etc. will be match
196
+     */  
197 197
     $config['log_logger_name_level'] = array();
198 198
 	
199 199
 	
Please login to merge, or discard this patch.
core/common.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         static $cfg;
148 148
         if (empty($cfg)) {
149 149
             $cfg[0] = & load_configurations();
150
-            if(! is_array($cfg[0])){
150
+            if (!is_array($cfg[0])) {
151 151
                 $cfg[0] = array();
152 152
             }
153 153
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             set_http_status_header(500);
198 198
         }
199 199
         $errorType = 'Error';
200
-        $errorsType = array (
200
+        $errorsType = array(
201 201
                 E_ERROR              => 'Error',
202 202
                 E_WARNING            => 'Warning',
203 203
                 E_PARSE              => 'Parsing Error',
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		
92 92
         //record the class instance
93 93
         $classes[$class] = isset($params) ? new $class($params) : new $class();
94
-		return $classes[$class];
94
+        return $classes[$class];
95 95
     }
96 96
 
97 97
     /**
@@ -179,17 +179,17 @@  discard block
 block discarded – undo
179 179
         die();
180 180
     }
181 181
 
182
-     /**
183
-     *  Function defined for PHP error message handling
184
-     *              
185
-     *  @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc.
186
-     *  @param string $errstr the error message
187
-     *  @param string $errfile the file where the error occurred
188
-     *  @param int $errline the line number where the error occurred
189
-     *  @codeCoverageIgnore
190
-     *  
191
-     *  @return boolean 
192
-     */
182
+        /**
183
+         *  Function defined for PHP error message handling
184
+         *              
185
+         *  @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc.
186
+         *  @param string $errstr the error message
187
+         *  @param string $errfile the file where the error occurred
188
+         *  @param int $errline the line number where the error occurred
189
+         *  @codeCoverageIgnore
190
+         *  
191
+         *  @return boolean 
192
+         */
193 193
     function fw_error_handler($errno, $errstr, $errfile, $errline) {
194 194
         $isError = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $errno) === $errno);
195 195
         if ($isError) {
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 E_RECOVERABLE_ERROR  => 'Catchable Fatal Error'
213 213
         );
214 214
         if (isset($errorsType[$errno])) {
215
-           $errorType = $errorsType[$errno];
215
+            $errorType = $errorsType[$errno];
216 216
         }
217 217
         $errorText = 'An error is occurred in the file ' . substr($errfile, strlen(ROOT_PATH)) . ' at line ' . $errline . ' raison : ' . $errstr;
218 218
         if ((error_reporting() & $errno) !== $errno) {
Please login to merge, or discard this patch.
core/classes/cache/ApcCache.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         /**
34 34
          * Construct new ApcCache instance
35 35
          */
36
-	public function __construct() {
36
+    public function __construct() {
37 37
             parent::__construct();
38 38
             if (!$this->isSupported()) {
39 39
                 show_error('The cache for APC[u] driver is not available. Check if APC[u] extension is loaded and enabled.');
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         public function set($key, $data, $ttl = 0) {
80 80
             $expire = time() + $ttl;
81 81
             $this->logger->debug('Setting cache data for key [' . $key . '], time to live [' . $ttl . '], '
82
-                                 . 'expire at [' . date('Y-m-d H:i:s', $expire) . ']');
82
+                                    . 'expire at [' . date('Y-m-d H:i:s', $expire) . ']');
83 83
             $result = apc_store($key, $data, $ttl);
84 84
             if ($result === false) {
85 85
                 $this->logger->error('Can not save cache data for the key [' . $key . '], return false');
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                             'mtime'  => $cacheInfos['creation_time'],
128 128
                             'expire' => $cacheInfos['creation_time'] + $cacheInfos['ttl'],
129 129
                             'ttl'    => $cacheInfos['ttl']
130
-                           );
130
+                            );
131 131
             } 
132 132
             $this->logger->info('This cache does not exists skipping');
133 133
             return false;
Please login to merge, or discard this patch.
core/classes/cache/FileCache.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
         public function set($key, $data, $ttl = 0) {
109 109
             $expire = time() + $ttl;
110 110
             $this->logger->debug('Setting cache data for key [' . $key . '], '
111
-                           . 'time to live [' . $ttl . '], '
112
-                           . 'expire at [' . date('Y-m-d H:i:s', $expire) . ']');
111
+                            . 'time to live [' . $ttl . '], '
112
+                            . 'expire at [' . date('Y-m-d H:i:s', $expire) . ']');
113 113
             $filePath = $this->getFilePath($key);
114 114
             $handle = fopen($filePath, 'w');
115 115
             if (!is_resource($handle)) {
116 116
                 $this->logger->error('Can not open the file cache '
117
-                                     . '[' . $filePath . '] for the key [' . $key . '], return false');
117
+                                        . '[' . $filePath . '] for the key [' . $key . '], return false');
118 118
                 return false;
119 119
             }
120 120
             flock($handle, LOCK_EX); // exclusive lock, will get released when the file is closed
@@ -191,10 +191,10 @@  discard block
 block discarded – undo
191 191
             if ($data['expire'] > time()) {
192 192
                 $this->logger->info('This cache not yet expired return cache informations');
193 193
                 return array(
194
-                           'mtime' => $data['mtime'],
195
-                           'expire' => $data['expire'],
196
-                           'ttl' => $data['ttl']
197
-                         );
194
+                            'mtime' => $data['mtime'],
195
+                            'expire' => $data['expire'],
196
+                            'ttl' => $data['ttl']
197
+                            );
198 198
             }
199 199
             $this->logger->info('This cache already expired return false');
200 200
             return false;
Please login to merge, or discard this patch.
core/libraries/Assets.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
      */
45 45
     class Assets extends BaseClass {
46 46
 
47
-         /**
48
-         * Construct new instance
49
-         */
47
+            /**
48
+             * Construct new instance
49
+             */
50 50
         public function __construct() {
51 51
             parent::__construct();
52 52
         }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
          * @see Assets:link
96 96
          */
97 97
         public function css($path) {
98
-           return $this->link($path, 'css');
98
+            return $this->link($path, 'css');
99 99
         }
100 100
 
101 101
         /**
Please login to merge, or discard this patch.