@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function setFindSource($value, array $middleware) |
57 | 57 | { |
58 | - $this->findSource = (bool) $value; |
|
58 | + $this->findSource = (bool)$value; |
|
59 | 59 | $this->middleware = $middleware; |
60 | 60 | } |
61 | 61 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | public function setExplainSource($enabled, $types) |
68 | 68 | { |
69 | 69 | $this->explainQuery = $enabled; |
70 | - if($types){ |
|
70 | + if ($types) { |
|
71 | 71 | $this->explainTypes = $types; |
72 | 72 | } |
73 | 73 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $bindings = $connection->prepareBindings($bindings); |
90 | 90 | // Run EXPLAIN on this query (if needed) |
91 | 91 | if ($this->explainQuery && preg_match('/^('.implode($this->explainTypes).') /i', $query)) { |
92 | - $statement = $pdo->prepare('EXPLAIN ' . $query); |
|
92 | + $statement = $pdo->prepare('EXPLAIN '.$query); |
|
93 | 93 | $statement->execute($bindings); |
94 | 94 | $explainResults = $statement->fetchAll(\PDO::FETCH_CLASS); |
95 | 95 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $hints[] = '<code>LIMIT</code> without <code>ORDER BY</code> causes non-deterministic results, depending on the query execution plan'; |
161 | 161 | } |
162 | 162 | if (preg_match('/LIKE\\s[\'"](%.*?)[\'"]/i', $query, $matches)) { |
163 | - $hints[] = 'An argument has a leading wildcard character: <code>' . $matches[1]. '</code>. |
|
163 | + $hints[] = 'An argument has a leading wildcard character: <code>'.$matches[1].'</code>. |
|
164 | 164 | The predicate with this argument is not sargable and cannot use an index if one exists.'; |
165 | 165 | } |
166 | 166 | return $hints; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | protected function parseTrace($index, array $trace) |
190 | 190 | { |
191 | - $frame = (object) [ |
|
191 | + $frame = (object)[ |
|
192 | 192 | 'index' => $index, |
193 | 193 | 'namespace' => null, |
194 | 194 | 'name' => null, |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | list($file, $frame->line) = $this->getTwigInfo($trace); |
208 | 208 | } elseif (strpos($file, storage_path()) !== false) { |
209 | 209 | $hash = pathinfo($file, PATHINFO_FILENAME); |
210 | - if (! $frame->name = $this->findViewFromHash($hash)) { |
|
210 | + if (!$frame->name = $this->findViewFromHash($hash)) { |
|
211 | 211 | $frame->name = $hash; |
212 | 212 | } |
213 | 213 | $frame->namespace = 'view'; |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $property->setAccessible(true); |
280 | 280 | $this->reflection['viewfinderViews'] = $property; |
281 | 281 | } |
282 | - foreach ($property->getValue($finder) as $name => $path){ |
|
282 | + foreach ($property->getValue($finder) as $name => $path) { |
|
283 | 283 | if (sha1($path) == $hash || md5($path) == $hash) { |
284 | 284 | return $name; |
285 | 285 | } |
@@ -372,9 +372,9 @@ discard block |
||
372 | 372 | 'connection' => $query['connection'], |
373 | 373 | ]; |
374 | 374 | //Add the results from the explain as new rows |
375 | - foreach($query['explain'] as $explain){ |
|
375 | + foreach ($query['explain'] as $explain) { |
|
376 | 376 | $statements[] = [ |
377 | - 'sql' => ' - EXPLAIN #' . $explain->id . ': `' . $explain->table . '` (' . $explain->select_type . ')', |
|
377 | + 'sql' => ' - EXPLAIN #'.$explain->id.': `'.$explain->table.'` ('.$explain->select_type.')', |
|
378 | 378 | 'type' => 'explain', |
379 | 379 | 'params' => $explain, |
380 | 380 | 'row_count' => $explain->rows, |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | ]; |
383 | 383 | } |
384 | 384 | } |
385 | - $nb_statements = array_filter($queries, function ($query) { |
|
385 | + $nb_statements = array_filter($queries, function($query) { |
|
386 | 386 | return $query['type'] == 'query'; |
387 | 387 | }); |
388 | 388 | $data = [ |
@@ -49,7 +49,7 @@ |
||
49 | 49 | protected function buildFakePage() |
50 | 50 | { |
51 | 51 | try { |
52 | - $rawResponse = App::$View->render('_core/exceptions/' . $this->tpl, ['msg' => $this->text]); |
|
52 | + $rawResponse = App::$View->render('_core/exceptions/'.$this->tpl, ['msg' => $this->text]); |
|
53 | 53 | if (Str::likeEmpty($rawResponse)) { |
54 | 54 | $rawResponse = $this->text; |
55 | 55 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | protected function sendHTML($message = null) |
59 | 59 | { |
60 | 60 | //header('HTTP/1.1 404 Not Found'); |
61 | - return '<!DOCTYPE html><html><head><title>An error has occurred</title></head><body><div style="width:60%; margin: auto; background-color: #fcc;border: 1px solid #faa; padding: 0.5em 1em;"><h1 style="font-size: 120%">Runtime error</h1><p>' . $message . '</p></div></body></html>'; |
|
61 | + return '<!DOCTYPE html><html><head><title>An error has occurred</title></head><body><div style="width:60%; margin: auto; background-color: #fcc;border: 1px solid #faa; padding: 0.5em 1em;"><h1 style="font-size: 120%">Runtime error</h1><p>'.$message.'</p></div></body></html>'; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |