Test Failed
Push — develop ( 5fdc8d...4bb748 )
by nguereza
06:31
created
core/bootstrap.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
     defined('ROOT_PATH') || exit('Access denied');
3
-     /**
4
-     * TNH Framework
5
-     *
6
-     * A simple PHP framework using HMVC architecture
7
-     *
8
-     * This content is released under the MIT License (MIT)
9
-     *
10
-     * Copyright (c) 2017 TNH Framework
11
-     *
12
-     * Permission is hereby granted, free of charge, to any person obtaining a copy
13
-     * of this software and associated documentation files (the "Software"), to deal
14
-     * in the Software without restriction, including without limitation the rights
15
-     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
-     * copies of the Software, and to permit persons to whom the Software is
17
-     * furnished to do so, subject to the following conditions:
18
-     *
19
-     * The above copyright notice and this permission notice shall be included in all
20
-     * copies or substantial portions of the Software.
21
-     *
22
-     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
-     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
-     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
-     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
-     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
-     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
-     * SOFTWARE.
29
-     */
3
+        /**
4
+         * TNH Framework
5
+         *
6
+         * A simple PHP framework using HMVC architecture
7
+         *
8
+         * This content is released under the MIT License (MIT)
9
+         *
10
+         * Copyright (c) 2017 TNH Framework
11
+         *
12
+         * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+         * of this software and associated documentation files (the "Software"), to deal
14
+         * in the Software without restriction, including without limitation the rights
15
+         * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+         * copies of the Software, and to permit persons to whom the Software is
17
+         * furnished to do so, subject to the following conditions:
18
+         *
19
+         * The above copyright notice and this permission notice shall be included in all
20
+         * copies or substantial portions of the Software.
21
+         *
22
+         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+         * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+         * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+         * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+         * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+         * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+         * SOFTWARE.
29
+         */
30 30
 
31 31
     /**
32 32
      *  @file bootstrap.php
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                     . '] please install a PHP version that is compatible.', 'PHP Error environment');	
94 94
     }
95 95
     $LOGGER->info('PHP version [' . phpversion() . '] is OK [REQUIRED MINIMUM: ' . TNH_MIN_PHP_VERSION 
96
-                   . ', REQUIRED MAXIMUM: ' . TNH_MAX_PHP_VERSION . '] application can work without any issue');
96
+                    . ', REQUIRED MAXIMUM: ' . TNH_MAX_PHP_VERSION . '] application can work without any issue');
97 97
 
98 98
     /**
99 99
      * Setting of the PHP error message handling function
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     /**
156 156
      * Register controllers autoload function
157 157
      */
158
-     spl_autoload_register('autoload_controller');
158
+        spl_autoload_register('autoload_controller');
159 159
 
160 160
     /**
161 161
      * Loading Security class
Please login to merge, or discard this patch.
core/classes/EventDispatcher.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
                 return;
157 157
             } 
158 158
             $this->logger->info('Found the registered event listener for the '
159
-                                 . 'event [' . $event->getName() . '] the list are: ' . stringify_vars($list));
159
+                                    . 'event [' . $event->getName() . '] the list are: ' . stringify_vars($list));
160 160
             foreach ($list as $listener) {
161 161
                 $result = call_user_func_array($listener, array($event));
162 162
                 if ($event->isReturnBack() === true) {
Please login to merge, or discard this patch.
core/classes/Response.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -287,12 +287,12 @@  discard block
 block discarded – undo
287 287
             return $this->output;
288 288
         }
289 289
 
290
-         /**
291
-         * Set the final page to be rendered
292
-         * @param string $output the content of the final page
293
-         * 
294
-         * @return object
295
-         */
290
+            /**
291
+             * Set the final page to be rendered
292
+             * @param string $output the content of the final page
293
+             * 
294
+             * @return object
295
+             */
296 296
         public function setOutput($output) {
297 297
             $this->output = $output;
298 298
             return $this;
@@ -367,12 +367,12 @@  discard block
 block discarded – undo
367 367
             //@codeCoverageIgnoreEnd
368 368
         }
369 369
 
370
-         /**
371
-         * Dispatch the FINAL_VIEW_READY event
372
-         *             
373
-         * @return string|null the final view content after processing by each listener
374
-         * if they exists otherwise the same content will be returned
375
-         */
370
+            /**
371
+             * Dispatch the FINAL_VIEW_READY event
372
+             *             
373
+             * @return string|null the final view content after processing by each listener
374
+             * if they exists otherwise the same content will be returned
375
+             */
376 376
         protected function dispatchFinalViewEvent() {
377 377
             //dispatch
378 378
             $event = get_instance()->eventdispatcher->dispatch(
@@ -416,12 +416,12 @@  discard block
 block discarded – undo
416 416
                                           && (bool) ini_get('zlib.output_compression') === false;
417 417
         }
418 418
 
419
-         /**
420
-         * Return the default full file path for view
421
-         * @param  string $file    the filename
422
-         * 
423
-         * @return string|null          the full file path
424
-         */
419
+            /**
420
+             * Return the default full file path for view
421
+             * @param  string $file    the filename
422
+             * 
423
+             * @return string|null          the full file path
424
+             */
425 425
         protected function getDefaultFilePathForView($file){
426 426
             $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH);
427 427
             $fullFilePath = null;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
                 $headerModifiedSince = $globals->server('HTTP_IF_MODIFIED_SINCE');
455 455
                 if (!empty($headerModifiedSince) && $lastModified <= strtotime($headerModifiedSince)) {
456 456
                     $this->logger->info('The cache page content is not yet expire for the '
457
-                                         . 'URL [' . $this->currentUrl . '] send 304 header to browser');
457
+                                            . 'URL [' . $this->currentUrl . '] send 304 header to browser');
458 458
                     $this->setStatus(304);
459 459
                     $this->sendHeaders();
460 460
                     return true;
@@ -470,8 +470,8 @@  discard block
 block discarded – undo
470 470
          */
471 471
         protected function sendCachePageContentToBrowser(&$cache) {
472 472
             $this->logger->info('The cache page content is expired or the browser does '
473
-                 . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] '
474
-                 . 'send cache headers to tell the browser');
473
+                    . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] '
474
+                    . 'send cache headers to tell the browser');
475 475
             $this->sendHeaders();
476 476
             //current page cache key
477 477
             $pageCacheKey = $this->currentUrlCacheKey;
@@ -610,18 +610,18 @@  discard block
 block discarded – undo
610 610
             }
611 611
         }
612 612
 
613
-         /**
614
-         * Set the mandory headers, like security, etc.
615
-         */
613
+            /**
614
+             * Set the mandory headers, like security, etc.
615
+             */
616 616
         protected function setRequiredHeaders() {
617 617
             $requiredHeaders = array(
618 618
                                 'X-XSS-Protection' => '1; mode=block',
619 619
                                 'X-Frame-Options'  => 'SAMEORIGIN'
620 620
                             );
621 621
             foreach ($requiredHeaders as $key => $value) {
622
-               if (!isset($this->headers[$key])) {
622
+                if (!isset($this->headers[$key])) {
623 623
                     $this->headers[$key] = $value;
624
-               } 
624
+                } 
625 625
             }
626 626
         }
627 627
     }
Please login to merge, or discard this patch.
core/classes/Router.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -278,14 +278,14 @@  discard block
 block discarded – undo
278 278
         }
279 279
 
280 280
         /**
281
-        * Setting the route configuration using the configuration file 
282
-        * and additional configuration from param
283
-        * @param array $overwriteConfig the additional configuration 
284
-        * to overwrite with the existing one
285
-        * @param boolean $useConfigFile whether to use route configuration file
286
-        * 
287
-        * @return object
288
-        */
281
+         * Setting the route configuration using the configuration file 
282
+         * and additional configuration from param
283
+         * @param array $overwriteConfig the additional configuration 
284
+         * to overwrite with the existing one
285
+         * @param boolean $useConfigFile whether to use route configuration file
286
+         * 
287
+         * @return object
288
+         */
289 289
         public function setRouteConfiguration(array $overwriteConfig = array(), $useConfigFile = true) {
290 290
             $route = array();
291 291
             if ($useConfigFile && file_exists(CONFIG_PATH . 'routes.php')) {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
             //the URL like http://domain.com/module/controller/method/arg1/arg2/argn 
367 367
             if (!$this->controller && $this->routeMethodMatch /* normally if the route method isnot match no need continue */) {
368 368
                 $this->logger->info('Cannot determine the routing information ' 
369
-                       . 'using the predefined routes configuration, will use the request URI parameters');
369
+                        . 'using the predefined routes configuration, will use the request URI parameters');
370 370
                 //determine route parameters using the route URI param
371 371
                 $this->determineRouteParamsFromRequestUri();
372 372
             }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
             //if the request method not match
397 397
             if(!$this->routeMethodMatch){
398
-                 //create the instance of Controller
398
+                    //create the instance of Controller
399 399
                 $cError = new Controller();
400 400
                 $cError->response->setStatus(405);
401 401
                 $cError->response->setOutput('HTTP method [' . $this->requestMethod . '] not allowed');
@@ -493,11 +493,11 @@  discard block
 block discarded – undo
493 493
             }
494 494
         }
495 495
 
496
-         /**
497
-         * Remove the URL suffix and query string values if exists
498
-         * @param  string $uri the route URI to process
499
-         * @return string      the final route uri after processed
500
-         */
496
+            /**
497
+             * Remove the URL suffix and query string values if exists
498
+             * @param  string $uri the route URI to process
499
+             * @return string      the final route uri after processed
500
+             */
501 501
         protected function removeSuffixAndQueryStringFromUri($uri) {
502 502
             $this->logger->debug('Check if URL suffix is enabled in the configuration');
503 503
             //remove url suffix from the request URI
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
                 $this->logger->info(
627 627
                                     'After loop in predefined routes configuration,'
628 628
                                     . 'the module name is set but the controller is not set,' 
629
-									. 'so we will use module as the controller'
629
+                                    . 'so we will use module as the controller'
630 630
                                 );
631 631
                 $this->controller = $this->module;
632 632
             }
Please login to merge, or discard this patch.