Passed
Push — 0.7.0 ( 1a66e7...b3d6c7 )
by Alexander
03:12 queued 11s
created
src/components/View/Engines/PhpEngine.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         try {
83 83
             $this->files->getRequire($path, $data);
84
-        } catch(Throwable $e) {
84
+        } catch (Throwable $e) {
85 85
             return $this->handleViewException($e, $obLevel);
86 86
         }
87 87
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     protected function handleViewException(Throwable $e, $obLevel)
102 102
     {
103
-        while(ob_get_level() > $obLevel) {
103
+        while (ob_get_level() > $obLevel) {
104 104
             ob_end_clean();
105 105
         }
106 106
 
Please login to merge, or discard this patch.
src/components/View/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	{
115 115
 		try {
116 116
 			$this->finder->find($view);
117
-		} catch(InvalidArgumentException $e) {
117
+		} catch (InvalidArgumentException $e) {
118 118
 			return false;
119 119
 		}
120 120
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 		);
140 140
 		
141 141
 		// Loader class instance.
142
-		return take($this->viewInstance($view, $path, $data), function ($view) {
142
+		return take($this->viewInstance($view, $path, $data), function($view) {
143 143
 			$this->callCreator($view);
144 144
 		});
145 145
 	}
Please login to merge, or discard this patch.
src/components/View/View.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 			$this->factory->flushStateIfDoneRendering();
121 121
 
122 122
 			return ! is_null($response) ? $response : $contents;
123
-		} catch(Throwable $e) {
123
+		} catch (Throwable $e) {
124 124
 			$this->factory->flushState();
125 125
 
126 126
 			throw $e;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	{
163 163
 		$data = array_merge($this->factory->getShared(), $this->data);
164 164
 		
165
-		return array_map(function ($value) {
165
+		return array_map(function($value) {
166 166
 			return ($value instanceof Renderable) ? $value->render() : $value;
167 167
 		}, $data);
168 168
 	}
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function renderSections()
178 178
 	{
179
-		return $this->render(function () {
179
+		return $this->render(function() {
180 180
 			return $this->factory->getSections();
181 181
 		});
182 182
 	}
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	public function bind($key, & $value) 
218 218
 	{
219
-		$this->data[$key] =& $value;
219
+		$this->data[$key] = & $value;
220 220
 
221 221
 		return $this;
222 222
 	}
Please login to merge, or discard this patch.
src/components/View/ViewServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function registerView()
59 59
     {
60
-        $this->app->singleton('view', function ($app) {
60
+        $this->app->singleton('view', function($app) {
61 61
             // The resolver will be used by an environment to get each of the various 
62 62
             // engine implementations such as plain PHP or Plaze engine.
63 63
             $resolver = $app['view.engine.resolver'];
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function registerViewFinder()
86 86
     {
87
-        $this->app->bind('view.finder', function ($app) {
87
+        $this->app->bind('view.finder', function($app) {
88 88
             return new FileViewFinder($app['files'], $app['config']['view.paths']);
89 89
         });
90 90
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function registerPlazeTranspiler()
98 98
     {
99
-        $this->app->singleton('plaze.transpiler', function ($app) {
99
+        $this->app->singleton('plaze.transpiler', function($app) {
100 100
             return new PlazeTranspiler(
101 101
                 $app['files'], $app['config']['view.transpiled']
102 102
             );
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function registerEngineResolver()
113 113
     {
114
-        $this->app->singleton('view.engine.resolver', function () {
114
+        $this->app->singleton('view.engine.resolver', function() {
115 115
             $resolver = new EngineResolver;
116 116
 
117 117
             // Register of the various view engines with the resolver
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function registerFileEngine($resolver)
135 135
     {
136
-        $resolver->register('file', function () {
136
+        $resolver->register('file', function() {
137 137
             return new FileEngine;
138 138
         });
139 139
     }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function registerPhpEngine($resolver)
149 149
     {
150
-        $resolver->register('php', function () {
150
+        $resolver->register('php', function() {
151 151
             return new PhpEngine($this->app['files']);
152 152
         });
153 153
     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      */
162 162
     public function registerPlazeEngine($resolver)
163 163
     {
164
-        $resolver->register('plaze', function () {
164
+        $resolver->register('plaze', function() {
165 165
             return new TranspilerEngine($this->app['plaze.transpiler'], $this->app['files']);
166 166
         });
167 167
     }
Please login to merge, or discard this patch.
src/components/View/Transpilers/Concerns/TranspilesEchos.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->rawTags[0], $this->rawTags[1]);
73 73
         
74
-        $callback = function ($matches) {
74
+        $callback = function($matches) {
75 75
             $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3];
76 76
             
77 77
             return $matches[1] ? substr($matches[0], 1) : "<?php echo {$matches[2]}; ?>{$whitespace}";
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->contentTags[0], $this->contentTags[1]);
93 93
         
94
-        $callback = function ($matches) {
94
+        $callback = function($matches) {
95 95
             $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3];
96 96
             
97 97
             $wrapped    = sprintf($this->echoFormat, $matches[2]);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     {
114 114
         $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', $this->escapedTags[0], $this->escapedTags[1]);
115 115
         
116
-        $callback = function ($matches) {
116
+        $callback = function($matches) {
117 117
             $whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3];
118 118
             
119 119
             return $matches[1] ? $matches[0] : "<?php echo e({$matches[2]}); ?>{$whitespace}";
Please login to merge, or discard this patch.
src/components/Support/Finder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
 
168 168
         if ( ! empty($file) || ! is_null($file)) {
169 169
             $file = str_replace(['::', '.'], DIRECTORY_SEPARATOR, $file);
170
-        } else  {
170
+        } else {
171 171
             $file = $file ?: 'empty';
172 172
 
173 173
             throw new InvalidArgumentException("File not found: [{$file}]");
Please login to merge, or discard this patch.
src/components/Support/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     function dd()
71 71
     {
72
-        array_map(function ($x) {
72
+        array_map(function($x) {
73 73
             var_dump($x);
74 74
         },  func_get_args());
75 75
             
Please login to merge, or discard this patch.
src/components/Routing/UrlGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 
263 263
         $uri = $this->trimUrl($root, $this->replaceRouteParameters($route->getRoute(), $parameters));
264 264
 
265
-        return $forced ? $uri : '/' .ltrim(str_replace($root, '', $uri), '/');
265
+        return $forced ? $uri : '/'.ltrim(str_replace($root, '', $uri), '/');
266 266
     }
267 267
     
268 268
     /**
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
      */
325 325
     protected function replaceNamedParameters($path, &$parameters)
326 326
     {
327
-        return preg_replace_callback('/\{(.*?)\??\}/', function ($match) use (&$parameters) {
327
+        return preg_replace_callback('/\{(.*?)\??\}/', function($match) use (&$parameters) {
328 328
             return isset($parameters[$match[1]]) ? Arr::pull($parameters, $match[1]) : $match[0];
329 329
         }, $path);
330 330
     }
Please login to merge, or discard this patch.
src/components/Routing/ResourceRegister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -339,7 +339,7 @@
 block discarded – undo
339 339
      */
340 340
     protected function getNestedResourceUri(array $segments)
341 341
     {
342
-        return implode('/', array_map(function ($segment) {
342
+        return implode('/', array_map(function($segment) {
343 343
             return $segment.'/{'.$this->getResourceWilcard($segment).'}';
344 344
         }, $segments));
345 345
     }
Please login to merge, or discard this patch.