We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -102,8 +102,8 @@ |
||
102 | 102 | |
103 | 103 | $sliceLength = 0; |
104 | 104 | |
105 | - // in case there is already an empty line at the end of the route file, we don't need to add another one |
|
106 | - if(trim($originalContent[$lastLine - 1]) === '') { |
|
105 | + // in case there is already an empty line at the end of the route file, we don't need to add another one |
|
106 | + if(trim($originalContent[$lastLine - 1]) === '') { |
|
107 | 107 | $lastLine--; |
108 | 108 | $sliceLength = 1; |
109 | 109 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $routeFilePath = base_path($this->option('route-file')); |
45 | 45 | |
46 | - if (! file_exists($routeFilePath)) { |
|
46 | + if (!file_exists($routeFilePath)) { |
|
47 | 47 | if ($routeFilePath !== base_path($this->backpackCustomRouteFile)) { |
48 | 48 | $this->info('The route file <fg=blue>'.$routeFilePath.'</> does not exist. Please create it first.'); |
49 | 49 | |
@@ -94,16 +94,16 @@ discard block |
||
94 | 94 | $originalContent[$lastLine] = $lastLineContent[0].'{'.PHP_EOL; |
95 | 95 | // push all other elements one line down creating space for the new code |
96 | 96 | for ($i = count($originalContent) - 1; $i > $lastLine; $i--) { |
97 | - $originalContent[$i+1] = $originalContent[$i]; |
|
97 | + $originalContent[$i + 1] = $originalContent[$i]; |
|
98 | 98 | } |
99 | - $originalContent[$lastLine+1] = $lastLineContent[1]; |
|
99 | + $originalContent[$lastLine + 1] = $lastLineContent[1]; |
|
100 | 100 | $lastLine++; |
101 | 101 | } |
102 | 102 | |
103 | 103 | $sliceLength = 0; |
104 | 104 | |
105 | 105 | // in case there is already an empty line at the end of the route file, we don't need to add another one |
106 | - if(trim($originalContent[$lastLine - 1]) === '') { |
|
106 | + if (trim($originalContent[$lastLine - 1]) === '') { |
|
107 | 107 | $lastLine--; |
108 | 108 | $sliceLength = 1; |
109 | 109 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | private function cleanContentArray(array $content) |
125 | 125 | { |
126 | - return array_filter(array_map(function ($line) { |
|
126 | + return array_filter(array_map(function($line) { |
|
127 | 127 | $lineText = trim($line); |
128 | 128 | if ($lineText === '' || |
129 | 129 | $lineText === '\n' || |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | private function getLastLineNumberThatContains($needle, $haystack) |
158 | 158 | { |
159 | - $matchingLines = array_filter($haystack, function ($k) use ($needle) { |
|
159 | + $matchingLines = array_filter($haystack, function($k) use ($needle) { |
|
160 | 160 | return strpos($k, $needle) !== false; |
161 | 161 | }); |
162 | 162 |