Passed
Push — 0.7.0 ( f20096...1a66e7 )
by Alexander
03:34 queued 10s
created
src/components/Pipeline/Pipeline.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
      */
152 152
     protected function call()
153 153
     {
154
-        return function ($stack, $pipe) {
155
-            return function ($passable) use ($stack, $pipe) {
154
+        return function($stack, $pipe) {
155
+            return function($passable) use ($stack, $pipe) {
156 156
                 try {
157 157
                     if (is_callable($pipe)) {
158 158
                         return $pipe($passable, $stack);
@@ -205,10 +205,10 @@  discard block
 block discarded – undo
205 205
      */
206 206
     protected function prepareDestination(Closure $destination)
207 207
     {
208
-        return function ($passable) use ($destination) {
208
+        return function($passable) use ($destination) {
209 209
             try {
210 210
                 return $destination($passable);
211
-            } catch(Throwable $e)  {
211
+            } catch (Throwable $e) {
212 212
                 return $this->handleException($passable, $e);
213 213
             }
214 214
         };
Please login to merge, or discard this patch.
src/components/Http/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
 			$replace = 0 === strcasecmp($name, 'Content-Type');
123 123
 
124 124
 			foreach ($values as $value) {
125
-				header($name.': '. $value, $replace, $this->status);
125
+				header($name.': '.$value, $replace, $this->status);
126 126
 			}
127 127
 		}
128 128
 
Please login to merge, or discard this patch.
src/components/Http/Http.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 			$protocol = 'REQUEST_URI';
114 114
 		}
115 115
 
116
-		switch($protocol) {
116
+		switch ($protocol) {
117 117
 			case 'REQUEST_URI':
118 118
 				$path = $this->parseRequestUri();
119 119
 				break;
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 			$last    = count($segs);
240 240
 			$baseUrl = '';
241 241
 			
242
-			do 	{
242
+			do {
243 243
 				$seg     = $segs[$index];
244 244
 				$baseUrl = '/'.$seg.$baseUrl;
245 245
 				++$index;
Please login to merge, or discard this patch.
src/components/Debug/GDebug.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 					$this->system->endOutputBuffering();
160 160
 				}
161 161
 
162
-				if (Misc::sendHeaders() && $handlerContentType)	{
162
+				if (Misc::sendHeaders() && $handlerContentType) {
163 163
 					header("Content-Type: {$handlerContentType}");
164 164
 				}
165 165
 			}
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
 		if ( ! $handler instanceof MainHandler) {
316 316
 			throw new InvalidArgumentException(
317
-				"Argument to " . __METHOD__ . " must be a callable, or instance of ".
317
+				"Argument to ".__METHOD__." must be a callable, or instance of ".
318 318
 				"Syscodes\\Contracts\\Debug\\Handler"
319 319
 			);
320 320
 		}
Please login to merge, or discard this patch.
src/components/Debug/ExceptionHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
         $caughtLength = $this->caughtLength = 0;
161 161
 
162
-        ob_start(function ($buffer) {
162
+        ob_start(function($buffer) {
163 163
             $this->caughtBuffer = $buffer;
164 164
 
165 165
             return '';            
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $this->sendPhpResponse($exception);
169 169
 
170 170
         if (isset($this->caughtBuffer[0])) {
171
-            ob_start(function ($buffer) {
171
+            ob_start(function($buffer) {
172 172
                 if ($this->caughtLength) {
173 173
                     $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtLength);
174 174
 
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
         }
459 459
 
460 460
         if (is_string($frmt)) {
461
-            $index  = strpos($f = $frmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l')) ?: strlen($f));
461
+            $index = strpos($f = $frmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l')) ?: strlen($f));
462 462
             $frmt = [substr($f, 0, $index)] + preg_split('/&([^>]++)>/', substr($f, $index), -1, PREG_SPLIT_DELIM_CAPTURE);
463 463
 
464 464
             for ($index = 1; isset($frmt[$index]); ++$index) {
Please login to merge, or discard this patch.
src/components/Debug/Exceptions/Handlers/PleasingPageHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 	public function setEditor($editor)
358 358
 	{
359 359
 		if ( ! is_callable($editor) && ! isset($this->editors[$editor])) {
360
-			throw new InvalidArgumentException("Unknown editor identifier: [{$editor}]. Known editors: " .
360
+			throw new InvalidArgumentException("Unknown editor identifier: [{$editor}]. Known editors: ".
361 361
 				implode(', ', array_keys($this->editors))
362 362
 			);
363 363
 		}
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 	{
381 381
 		$editor = $this->getEditor($file, $line);
382 382
 
383
-		if (empty($editor))	{
383
+		if (empty($editor)) {
384 384
 			return false;
385 385
 		}
386 386
 
Please login to merge, or discard this patch.
src/components/Debug/Exceptions/FrameHandler/Frame.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
         $comments = $this->comments;
151 151
 
152 152
         if ($filter !== null) {
153
-            $comments = array_filter($comments, function ($comment) use ($filter) {
153
+            $comments = array_filter($comments, function($comment) use ($filter) {
154 154
                 return $comment['context'] == $filter;
155 155
             });
156 156
         }
Please login to merge, or discard this patch.
src/components/Debug/Exceptions/Util/TemplateHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
 		if ($bytes < 1024) {
108 108
 			return $bytes.'B';
109 109
 		} else if ($bytes < 1048576) {
110
-			return round($bytes/1024, 2).'KB';
110
+			return round($bytes / 1024, 2).'KB';
111 111
 		}
112 112
 
113
-		return round($bytes/1048576, 2).'MB';
113
+		return round($bytes / 1048576, 2).'MB';
114 114
 	}
115 115
 	
116 116
 	/**
@@ -217,17 +217,17 @@  discard block
 block discarded – undo
217 217
 		}
218 218
 
219 219
 		$origin  = str_replace(["\r\n", "\r"], "\n", $origin);
220
-		$origin  = explode("\n", highlight_string($origin , true));
220
+		$origin  = explode("\n", highlight_string($origin, true));
221 221
 		$origin  = str_replace('<br />', "\n", $origin [1]);
222 222
 
223 223
 		$origin  = explode("\n", str_replace("\r\n", "\n", $origin));
224 224
 
225 225
 		// Get just the part to show
226
-		$start = $lineNumber - (int)round($lines / 2);
226
+		$start = $lineNumber - (int) round($lines / 2);
227 227
 		$start = $start < 0 ? 0 : $start;
228 228
 
229 229
 		// Get just the lines we need to display, while keeping line numbers...
230
-		$origin  = array_splice($origin, $start, $lines, true);
230
+		$origin = array_splice($origin, $start, $lines, true);
231 231
 
232 232
 		// Used to format the line number in the source
233 233
 		$format = '% '.strlen($start + $lines).'d';
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 			$spans += substr_count($row, '<span') - substr_count($row, '</span');
244 244
 			$row = str_replace(["\r", "\n"], ['', ''], $row);
245 245
 
246
-			if (($n+$start+1) == $lineNumber) {
246
+			if (($n + $start + 1) == $lineNumber) {
247 247
 				preg_match_all('#<[^>]+>#', $row, $tags);
248 248
 				$out .= sprintf("<span class='line highlight'><span class='number'>{$format}</span> %s\n</span>%s",
249 249
 						$n + $start + 1,
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 						implode('', $tags[0])
252 252
 				);
253 253
 			} else {
254
-				$out .= sprintf('<span class="number">'.$format.'</span> %s <span class="line">', $n + $start +1, $row) ."\n";
254
+				$out .= sprintf('<span class="number">'.$format.'</span> %s <span class="line">', $n + $start + 1, $row)."\n";
255 255
 			}
256 256
 		}
257 257
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	public function slug($original)
284 284
 	{
285 285
 		$slug = str_replace(" ", "-", $original);
286
-		$slug = preg_replace('/[^\w\d\-\_]/i',' ', $slug);
286
+		$slug = preg_replace('/[^\w\d\-\_]/i', ' ', $slug);
287 287
 
288 288
 		return strtolower($slug);
289 289
 	}
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 		}
307 307
 
308 308
 		// Instantiate the error view and prepare the vars
309
-		call_user_func(function () {
309
+		call_user_func(function() {
310 310
 			extract(func_get_arg(1));
311 311
 			include func_get_arg(0);
312 312
 		}, $template, $vars);
Please login to merge, or discard this patch.
src/components/Translation/TranslationServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function register()
40 40
     {
41
-        $this->app->singleton('translator', function () {            
41
+        $this->app->singleton('translator', function() {            
42 42
             $locale = $this->app['config']['app.locale'];
43 43
             
44 44
             return new Translator($locale);            
Please login to merge, or discard this patch.