Completed
Branch master (b19b02)
by Igor
02:23 queued 53s
created
src/Core/BaseController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __construct(string &$packageRoot, Request &$request)
23 23
     {
24
-        $this->packageRoot =& $packageRoot;
25
-        $this->request =& $request;
24
+        $this->packageRoot = & $packageRoot;
25
+        $this->request = & $request;
26 26
         $this->response = new Response();
27
-        $this->data['request'] =& $this->request;
27
+        $this->data['request'] = & $this->request;
28 28
         $this->deleteJsonKeys = true;
29 29
     }
30 30
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     protected function setResponse(Response &$response)
59 59
     {
60
-        $this->response =& $response;
60
+        $this->response = & $response;
61 61
     }
62 62
 
63 63
     /**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     private function deleteArrayKeys(&$arr): array
144 144
     {
145 145
         $lst = [];
146
-        foreach($arr as $k => $v){
146
+        foreach ($arr as $k => $v) {
147 147
             if (is_array($v)) {
148 148
                 $lst[] = $this->deleteArrayKeys($v);
149 149
             } else {
Please login to merge, or discard this patch.
src/Core/Application.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,17 +24,17 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct(string $appRoot)
26 26
     {
27
-        $appRoot = rtrim($appRoot, '/') . '/';
27
+        $appRoot = rtrim($appRoot, '/').'/';
28 28
         $this->packageRoot = $appRoot;
29 29
 
30 30
         /**
31 31
          * Register autoload to app/package/$package/src dir's.
32 32
          */
33
-        spl_autoload_register(function ($path) use ($appRoot) {
33
+        spl_autoload_register(function($path) use ($appRoot) {
34 34
             $path = explode('\\', $path);
35
-            array_shift($path);                                        // Vendor
36
-            $package = $appRoot . 'package/' . array_shift($path);     // Package
37
-            $path = $package . '/src/' . implode('/', $path) . '.php';
35
+            array_shift($path); // Vendor
36
+            $package = $appRoot.'package/'.array_shift($path); // Package
37
+            $path = $package.'/src/'.implode('/', $path).'.php';
38 38
             if (file_exists($path)) {
39 39
                 require_once $path;
40 40
             }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $request = new Request($languageList, $packageList, $url);
58 58
 
59
-        $this->packageRoot .= 'package/' . $request->package() . '/';
59
+        $this->packageRoot .= 'package/'.$request->package().'/';
60 60
 
61 61
         try {
62 62
             /**
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
                 /**
67 67
                  * Path to custom router class.
68 68
                  */
69
-                $path = $this->packageRoot . 'CustomRoute.php';
69
+                $path = $this->packageRoot.'CustomRoute.php';
70 70
                 if (file_exists($path)) {
71 71
                     require $path;
72
-                    $route = $request->package() . '\\CustomRoute';
72
+                    $route = $request->package().'\\CustomRoute';
73 73
                     /**
74 74
                      * @var IRoute $route
75 75
                      */
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $this->response->setStatusCode(404);
109 109
         $content = '404 Not Found';
110
-        if (file_exists($this->packageRoot . '/view/404.html.php')) {
110
+        if (file_exists($this->packageRoot.'/view/404.html.php')) {
111 111
             $content = (new Native($this->packageRoot))->getContent('404.html.php');
112 112
         }
113 113
         $this->response->setContent($content);
Please login to merge, or discard this patch.