Passed
Push — master ( 238b62...b9e1a7 )
by Maxim
02:32
created
src/errorHandler/ErrorHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         (new Run())->pushHandler(\ENV === 'dev'
16 16
             ? new PrettyPageHandler()
17
-            : function () {
17
+            : function() {
18 18
                 $errorPagePath = $this->getErrorPagePath();
19 19
                 if ($errorPagePath && \file_exists($errorPagePath)) {
20 20
                     echo \file_get_contents($errorPagePath);
Please login to merge, or discard this patch.
src/router/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      */
65 65
     protected function configureDispatcher(): Dispatcher
66 66
     {
67
-        return \FastRoute\simpleDispatcher(function (RouteCollector $collector) {
67
+        return \FastRoute\simpleDispatcher(function(RouteCollector $collector) {
68 68
             foreach ($this->config as $route) {
69 69
                 $collector->addRoute($route[0], $route[1], $route[2]);
70 70
             }
Please login to merge, or discard this patch.
src/router/Routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
              * @var int $k
119 119
              * @var array $route
120 120
              */
121
-            foreach ((array)$this->config as $k => $route) {
121
+            foreach ((array) $this->config as $k => $route) {
122 122
                 if ($route[1] === $beforeRoute) {
123 123
                     $k > 1
124 124
                         ? \array_splice($this->config, $k, 0, [$routeDefinition])
Please login to merge, or discard this patch.
src/assets/AssetManager.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
     public function getPath(string $assetClass, $file, bool $absolute = false): string
83 83
     {
84 84
         if (!isset($this->assets[$assetClass])) {
85
-            throw new Exception('Asset ' . $assetClass . ' is not registered');
85
+            throw new Exception('Asset '.$assetClass.' is not registered');
86 86
         }
87 87
 
88 88
         return $absolute
89
-            ? $this->webRoot . $this->getWebDir($this->assets[$assetClass]) . \ltrim($file, '/')
90
-            : $this->getWebDir($this->assets[$assetClass]) . \ltrim($file, '/');
89
+            ? $this->webRoot.$this->getWebDir($this->assets[$assetClass]).\ltrim($file, '/')
90
+            : $this->getWebDir($this->assets[$assetClass]).\ltrim($file, '/');
91 91
     }
92 92
 
93 93
     /**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         foreach ($this->assets as $asset) {
100 100
             $links = $this->getLinks($asset, $asset->css());
101 101
             foreach ($links as $link) {
102
-                $result[] = '<link rel="stylesheet" href="' . $link . '">';
102
+                $result[] = '<link rel="stylesheet" href="'.$link.'">';
103 103
             }
104 104
         }
105 105
         return \implode('', $result);
@@ -112,15 +112,15 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $result = [];
114 114
         foreach ($this->assets as $asset) {
115
-            $productionJs = $this->getWebDir($asset) . self::PRODUCTION_JS;
116
-            if ($this->isProduction() && \file_exists($this->webRoot . $productionJs)) {
115
+            $productionJs = $this->getWebDir($asset).self::PRODUCTION_JS;
116
+            if ($this->isProduction() && \file_exists($this->webRoot.$productionJs)) {
117 117
                 $links = $this->getLinks($asset, $asset->externalJs());
118 118
                 $links[] = $productionJs;
119 119
             } else {
120 120
                 $links = $this->getLinks($asset, $asset->js());
121 121
             }
122 122
             foreach ($links as $link) {
123
-                $result[] = '<script src="' . $link . '"></script>';
123
+                $result[] = '<script src="'.$link.'"></script>';
124 124
             }
125 125
         }
126 126
         return \implode('', $result);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     protected function publishAsset(AbstractAsset $asset)
151 151
     {
152 152
         $hash = $asset->getHash();
153
-        $dir = $this->webRoot . '/' . $this->assetDirName . '/' . $hash;
153
+        $dir = $this->webRoot.'/'.$this->assetDirName.'/'.$hash;
154 154
         if ($asset->useLinks) {
155 155
             if (!$this->filesystem->exists($dir)) {
156 156
                 $this->filesystem->symlink($asset->getBasePath(), $dir, true);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     private function getWebDir(AbstractAsset $asset): string
173 173
     {
174 174
         return $asset->publish
175
-            ? '/' . $this->assetDirName . '/' . $asset->getHash() . '/'
175
+            ? '/'.$this->assetDirName.'/'.$asset->getHash().'/'
176 176
             : '/';
177 177
     }
178 178
 
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
     {
203 203
         $link = $file;
204 204
         if (false === \strpos($file, 'http') && false === \strpos($file, '//')) {
205
-            $filePath = $dir . \ltrim($file, '/');
206
-            $timestamp = \filemtime($this->webRoot . $filePath);
207
-            $link = $filePath . '?' . $timestamp;
205
+            $filePath = $dir.\ltrim($file, '/');
206
+            $timestamp = \filemtime($this->webRoot.$filePath);
207
+            $link = $filePath.'?'.$timestamp;
208 208
         }
209 209
 
210 210
         return $link;
Please login to merge, or discard this patch.