@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * @class CsrfSessionStorage |
55 | 55 | * @package Platine\Framework\Security\Csrf\Storage |
56 | 56 | */ |
57 | -class CsrfSessionStorage implements CsrfStorageInterface |
|
58 | -{ |
|
57 | +class CsrfSessionStorage implements CsrfStorageInterface { |
|
59 | 58 | /** |
60 | 59 | * The session key used to store CSRF data |
61 | 60 | */ |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | * Create new instance |
73 | 72 | * @param Session $session |
74 | 73 | */ |
75 | - public function __construct(Session $session) |
|
76 | - { |
|
74 | + public function __construct(Session $session) { |
|
77 | 75 | $this->session = $session; |
78 | 76 | } |
79 | 77 | |
@@ -86,7 +84,7 @@ discard block |
||
86 | 84 | $key = $this->getKeyName($name); |
87 | 85 | $data = $this->session->get($key, []); |
88 | 86 | |
89 | - if (count($data) === 0 || $data['expire'] <= time()) { |
|
87 | + if (count($data) === 0 || $data['expire'] <= time()) { |
|
90 | 88 | return null; |
91 | 89 | } |
92 | 90 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | ?CsrfStorageInterface $storage = null |
84 | 84 | ) { |
85 | 85 | $this->config = $config; |
86 | - $this->storage = $storage ?? new CsrfNullStorage(); |
|
86 | + $this->storage = $storage ?? new CsrfNullStorage(); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @package Platine\Framework\Security\Csrf |
60 | 60 | * @template T |
61 | 61 | */ |
62 | -class CsrfManager |
|
63 | -{ |
|
62 | +class CsrfManager { |
|
64 | 63 | /** |
65 | 64 | * The application configuration class |
66 | 65 | * @var Config<T> |
@@ -81,7 +80,7 @@ discard block |
||
81 | 80 | public function __construct( |
82 | 81 | Config $config, |
83 | 82 | ?CsrfStorageInterface $storage = null |
84 | - ) { |
|
83 | + ) { |
|
85 | 84 | $this->config = $config; |
86 | 85 | $this->storage = $storage ?? new CsrfNullStorage(); |
87 | 86 | } |
@@ -94,18 +93,18 @@ discard block |
||
94 | 93 | */ |
95 | 94 | public function validate(ServerRequestInterface $request, ?string $key = null): bool |
96 | 95 | { |
97 | - if ($key === null) { |
|
96 | + if ($key === null) { |
|
98 | 97 | $key = $this->getConfigValue('key'); |
99 | 98 | } |
100 | 99 | |
101 | 100 | $storageToken = $this->storage->get($key); |
102 | - if ($storageToken === null) { |
|
101 | + if ($storageToken === null) { |
|
103 | 102 | return false; |
104 | 103 | } |
105 | 104 | |
106 | 105 | $token = $this->getRequestToken($request, $key); |
107 | 106 | |
108 | - if ($token === null || $token !== $storageToken) { |
|
107 | + if ($token === null || $token !== $storageToken) { |
|
109 | 108 | return false; |
110 | 109 | } |
111 | 110 | |
@@ -119,12 +118,12 @@ discard block |
||
119 | 118 | */ |
120 | 119 | public function getToken(?string $key = null): string |
121 | 120 | { |
122 | - if ($key === null) { |
|
121 | + if ($key === null) { |
|
123 | 122 | $key = $this->getConfigValue('key'); |
124 | 123 | } |
125 | 124 | |
126 | 125 | $value = $this->storage->get($key); |
127 | - if ($value === null) { |
|
126 | + if ($value === null) { |
|
128 | 127 | // Generate the token |
129 | 128 | $value = sha1(Str::randomToken(24)); |
130 | 129 | $expire = $this->getConfigValue('expire') ?? 300; |
@@ -145,7 +144,7 @@ discard block |
||
145 | 144 | { |
146 | 145 | $token = $this->getToken($key); |
147 | 146 | |
148 | - if ($key === null) { |
|
147 | + if ($key === null) { |
|
149 | 148 | $key = (string) $this->getConfigValue('key'); |
150 | 149 | } |
151 | 150 | |
@@ -171,11 +170,11 @@ discard block |
||
171 | 170 | { |
172 | 171 | $param = new RequestData($request); |
173 | 172 | $token = $param->post($key); |
174 | - if ($token === null) { |
|
173 | + if ($token === null) { |
|
175 | 174 | $token = $param->get($key); |
176 | 175 | } |
177 | 176 | |
178 | - if ($token === null) { |
|
177 | + if ($token === null) { |
|
179 | 178 | $token = $request->getHeaderLine('X-Csrf-Token'); |
180 | 179 | } |
181 | 180 | |
@@ -188,8 +187,7 @@ discard block |
||
188 | 187 | * @param string $key |
189 | 188 | * @return mixed |
190 | 189 | */ |
191 | - private function getConfigValue(string $key) |
|
192 | - { |
|
190 | + private function getConfigValue(string $key) { |
|
193 | 191 | $config = $this->config->get('security.csrf', []); |
194 | 192 | |
195 | 193 | return $config[$key] ?? null; |
@@ -111,7 +111,7 @@ |
||
111 | 111 | // ensure indexes are numerically |
112 | 112 | $urls = array_values($values); |
113 | 113 | |
114 | - return array_map(function (string $url) { |
|
114 | + return array_map(function(string $url) { |
|
115 | 115 | return sprintf('"%s"', $url); |
116 | 116 | }, $urls); |
117 | 117 | } |
@@ -52,16 +52,15 @@ discard block |
||
52 | 52 | * @class FeaturePermissionPolicy |
53 | 53 | * @package Platine\Framework\Security\Policy |
54 | 54 | */ |
55 | -class FeaturePermissionPolicy extends AbstractPolicy |
|
56 | -{ |
|
55 | +class FeaturePermissionPolicy extends AbstractPolicy { |
|
57 | 56 | /** |
58 | 57 | * {@inheritdoc} |
59 | 58 | */ |
60 | 59 | public function headers(): string |
61 | 60 | { |
62 | 61 | $headers = []; |
63 | - foreach ($this->configurations as $name => $config) { |
|
64 | - if ($name === 'enable') { |
|
62 | + foreach ($this->configurations as $name => $config) { |
|
63 | + if ($name === 'enable') { |
|
65 | 64 | continue; |
66 | 65 | } |
67 | 66 | |
@@ -80,14 +79,14 @@ discard block |
||
80 | 79 | */ |
81 | 80 | public function directive(array $config): string |
82 | 81 | { |
83 | - if ($config['none'] ?? false) { |
|
82 | + if ($config['none'] ?? false) { |
|
84 | 83 | return '()'; |
85 | - } elseif ($config['*'] ?? false) { |
|
84 | + } elseif ($config['*'] ?? false) { |
|
86 | 85 | return '*'; |
87 | 86 | } |
88 | 87 | |
89 | 88 | $origins = $this->origins($config['origins'] ?? []); |
90 | - if ($config['self'] ?? false) { |
|
89 | + if ($config['self'] ?? false) { |
|
91 | 90 | array_unshift($origins, 'self'); |
92 | 91 | } |
93 | 92 | |
@@ -111,7 +110,7 @@ discard block |
||
111 | 110 | // ensure indexes are numerically |
112 | 111 | $urls = array_values($values); |
113 | 112 | |
114 | - return array_map(function (string $url) { |
|
113 | + return array_map(function (string $url) { |
|
115 | 114 | return sprintf('"%s"', $url); |
116 | 115 | }, $urls); |
117 | 116 | } |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $directives = array_intersect_key($config, $this->whitelist); |
80 | 80 | $values = array_filter($directives); |
81 | 81 | |
82 | - $results = array_map(function (string $directive) { |
|
82 | + $results = array_map(function(string $directive) { |
|
83 | 83 | if ($directive === 'execution-contexts') { |
84 | 84 | $directive = 'executionContexts'; |
85 | 85 | } |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * @class ClearSiteDataPolicy |
53 | 53 | * @package Platine\Framework\Security\Policy |
54 | 54 | */ |
55 | -class ClearSiteDataPolicy extends AbstractPolicy |
|
56 | -{ |
|
55 | +class ClearSiteDataPolicy extends AbstractPolicy { |
|
57 | 56 | /** |
58 | 57 | * Clear Site Data white list directives. |
59 | 58 | * @var array<string, bool> |
@@ -72,15 +71,15 @@ discard block |
||
72 | 71 | { |
73 | 72 | $config = $this->configurations; |
74 | 73 | |
75 | - if ($config['all'] ?? false) { |
|
74 | + if ($config['all'] ?? false) { |
|
76 | 75 | return '"*"'; |
77 | 76 | } |
78 | 77 | |
79 | 78 | $directives = array_intersect_key($config, $this->whitelist); |
80 | 79 | $values = array_filter($directives); |
81 | 80 | |
82 | - $results = array_map(function (string $directive) { |
|
83 | - if ($directive === 'execution-contexts') { |
|
81 | + $results = array_map(function (string $directive) { |
|
82 | + if ($directive === 'execution-contexts') { |
|
84 | 83 | $directive = 'executionContexts'; |
85 | 84 | } |
86 | 85 |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | $filtered = $this->filter($config, $whitelist); |
147 | 147 | |
148 | - return array_map(function (string $keyword) { |
|
148 | + return array_map(function(string $keyword) { |
|
149 | 149 | return sprintf('\'%s\'', $keyword); |
150 | 150 | }, $filtered); |
151 | 151 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function schemes(array $schemes): array |
159 | 159 | { |
160 | - return array_map(function (string $scheme) { |
|
160 | + return array_map(function(string $scheme) { |
|
161 | 161 | $clean = trim($scheme); |
162 | 162 | |
163 | 163 | if (substr($clean, -1) === ':') { |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function nonces(array $nonces): array |
177 | 177 | { |
178 | - return array_map(function (string $nonce) { |
|
178 | + return array_map(function(string $nonce) { |
|
179 | 179 | $clean = trim($nonce); |
180 | 180 | |
181 | 181 | if (base64_decode($clean, true) === false) { |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | { |
223 | 223 | $pluginTypes = $this->configurations['plugin-types'] ?? []; |
224 | 224 | |
225 | - $filtered = array_filter($pluginTypes, function (string $mime) { |
|
225 | + $filtered = array_filter($pluginTypes, function(string $mime) { |
|
226 | 226 | return preg_match('/^[a-z\-]+\/[a-z\-]+$/i', $mime); |
227 | 227 | }); |
228 | 228 |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * @class ContentSecurityPolicy |
53 | 53 | * @package Platine\Framework\Security\Policy |
54 | 54 | */ |
55 | -class ContentSecurityPolicy extends AbstractPolicy |
|
56 | -{ |
|
55 | +class ContentSecurityPolicy extends AbstractPolicy { |
|
57 | 56 | /** |
58 | 57 | * Content Security Policy white list directives. |
59 | 58 | * @var array<string, bool> |
@@ -109,7 +108,7 @@ discard block |
||
109 | 108 | */ |
110 | 109 | public function directive(array $config): string |
111 | 110 | { |
112 | - if ($config['none'] ?? false) { |
|
111 | + if ($config['none'] ?? false) { |
|
113 | 112 | return '\'none\''; |
114 | 113 | } |
115 | 114 | |
@@ -145,7 +144,7 @@ discard block |
||
145 | 144 | |
146 | 145 | $filtered = $this->filter($config, $whitelist); |
147 | 146 | |
148 | - return array_map(function (string $keyword) { |
|
147 | + return array_map(function (string $keyword) { |
|
149 | 148 | return sprintf('\'%s\'', $keyword); |
150 | 149 | }, $filtered); |
151 | 150 | } |
@@ -157,10 +156,10 @@ discard block |
||
157 | 156 | */ |
158 | 157 | public function schemes(array $schemes): array |
159 | 158 | { |
160 | - return array_map(function (string $scheme) { |
|
159 | + return array_map(function (string $scheme) { |
|
161 | 160 | $clean = trim($scheme); |
162 | 161 | |
163 | - if (substr($clean, -1) === ':') { |
|
162 | + if (substr($clean, -1) === ':') { |
|
164 | 163 | return $clean; |
165 | 164 | } |
166 | 165 | |
@@ -175,10 +174,10 @@ discard block |
||
175 | 174 | */ |
176 | 175 | public function nonces(array $nonces): array |
177 | 176 | { |
178 | - return array_map(function (string $nonce) { |
|
177 | + return array_map(function (string $nonce) { |
|
179 | 178 | $clean = trim($nonce); |
180 | 179 | |
181 | - if (base64_decode($clean, true) === false) { |
|
180 | + if (base64_decode($clean, true) === false) { |
|
182 | 181 | return ''; |
183 | 182 | } |
184 | 183 | |
@@ -195,15 +194,15 @@ discard block |
||
195 | 194 | { |
196 | 195 | $result = []; |
197 | 196 | |
198 | - foreach ($groups as $hash => $items) { |
|
199 | - if (!in_array($hash, ['sha256', 'sha384', 'sha512'], true)) { |
|
197 | + foreach ($groups as $hash => $items) { |
|
198 | + if (!in_array($hash, ['sha256', 'sha384', 'sha512'], true)) { |
|
200 | 199 | continue; |
201 | 200 | } |
202 | 201 | |
203 | - foreach ($items as $item) { |
|
202 | + foreach ($items as $item) { |
|
204 | 203 | $clean = trim($item); |
205 | 204 | |
206 | - if (base64_decode($clean, true) === false) { |
|
205 | + if (base64_decode($clean, true) === false) { |
|
207 | 206 | continue; |
208 | 207 | } |
209 | 208 | |
@@ -222,11 +221,11 @@ discard block |
||
222 | 221 | { |
223 | 222 | $pluginTypes = $this->configurations['plugin-types'] ?? []; |
224 | 223 | |
225 | - $filtered = array_filter($pluginTypes, function (string $mime) { |
|
224 | + $filtered = array_filter($pluginTypes, function (string $mime) { |
|
226 | 225 | return preg_match('/^[a-z\-]+\/[a-z\-]+$/i', $mime); |
227 | 226 | }); |
228 | 227 | |
229 | - if (count($filtered) > 0) { |
|
228 | + if (count($filtered) > 0) { |
|
230 | 229 | array_unshift($filtered, 'plugin-types'); |
231 | 230 | } |
232 | 231 | |
@@ -241,7 +240,7 @@ discard block |
||
241 | 240 | { |
242 | 241 | $sandbox = $this->configurations['sandbox'] ?? []; |
243 | 242 | |
244 | - if (!($sandbox['enable'] ?? false)) { |
|
243 | + if (!($sandbox['enable'] ?? false)) { |
|
245 | 244 | return ''; |
246 | 245 | } |
247 | 246 | |
@@ -276,7 +275,7 @@ discard block |
||
276 | 275 | { |
277 | 276 | $config = $this->configurations['require-trusted-types-for'] ?? []; |
278 | 277 | |
279 | - if (!($config['script'] ?? false)) { |
|
278 | + if (!($config['script'] ?? false)) { |
|
280 | 279 | return ''; |
281 | 280 | } |
282 | 281 | |
@@ -291,17 +290,17 @@ discard block |
||
291 | 290 | { |
292 | 291 | $trustedTypes = $this->configurations['trusted-types'] ?? []; |
293 | 292 | |
294 | - if (!($trustedTypes['enable'] ?? false)) { |
|
293 | + if (!($trustedTypes['enable'] ?? false)) { |
|
295 | 294 | return ''; |
296 | 295 | } |
297 | 296 | |
298 | 297 | $policies = array_map('trim', $trustedTypes['policies'] ?? []); |
299 | 298 | |
300 | - if ($trustedTypes['default'] ?? false) { |
|
299 | + if ($trustedTypes['default'] ?? false) { |
|
301 | 300 | $policies[] = 'default'; |
302 | 301 | } |
303 | 302 | |
304 | - if ($trustedTypes['allow-duplicates'] ?? false) { |
|
303 | + if ($trustedTypes['allow-duplicates'] ?? false) { |
|
305 | 304 | $policies[] = '\'allow-duplicates\''; |
306 | 305 | } |
307 | 306 | |
@@ -316,7 +315,7 @@ discard block |
||
316 | 315 | */ |
317 | 316 | public function blockAllMixedContent(): string |
318 | 317 | { |
319 | - if (!($this->configurations['block-all-mixed-content'] ?? false)) { |
|
318 | + if (!($this->configurations['block-all-mixed-content'] ?? false)) { |
|
320 | 319 | return ''; |
321 | 320 | } |
322 | 321 | |
@@ -329,7 +328,7 @@ discard block |
||
329 | 328 | */ |
330 | 329 | public function upgradeInsecureRequests(): string |
331 | 330 | { |
332 | - if (!($this->configurations['upgrade-insecure-requests'] ?? false)) { |
|
331 | + if (!($this->configurations['upgrade-insecure-requests'] ?? false)) { |
|
333 | 332 | return ''; |
334 | 333 | } |
335 | 334 | |
@@ -342,7 +341,7 @@ discard block |
||
342 | 341 | */ |
343 | 342 | public function reportTo(): string |
344 | 343 | { |
345 | - if (empty($this->configurations['report-to'])) { |
|
344 | + if (empty($this->configurations['report-to'])) { |
|
346 | 345 | return ''; |
347 | 346 | } |
348 | 347 | |
@@ -355,7 +354,7 @@ discard block |
||
355 | 354 | */ |
356 | 355 | public function reportUri(): string |
357 | 356 | { |
358 | - if (empty($this->configurations['report-uri'])) { |
|
357 | + if (empty($this->configurations['report-uri'])) { |
|
359 | 358 | return ''; |
360 | 359 | } |
361 | 360 | |
@@ -397,14 +396,14 @@ discard block |
||
397 | 396 | protected function directives(): string |
398 | 397 | { |
399 | 398 | $result = []; |
400 | - foreach ($this->configurations as $name => $config) { |
|
401 | - if (!($this->whitelist[$name] ?? false)) { |
|
399 | + foreach ($this->configurations as $name => $config) { |
|
400 | + if (!($this->whitelist[$name] ?? false)) { |
|
402 | 401 | continue; |
403 | 402 | } |
404 | 403 | |
405 | 404 | $value = $this->directive($config); |
406 | 405 | |
407 | - if (empty($value)) { |
|
406 | + if (empty($value)) { |
|
408 | 407 | continue; |
409 | 408 | } |
410 | 409 |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * @class AbstractPolicy |
53 | 53 | * @package Platine\Framework\Security\Policy |
54 | 54 | */ |
55 | -abstract class AbstractPolicy |
|
56 | -{ |
|
55 | +abstract class AbstractPolicy { |
|
57 | 56 | /** |
58 | 57 | * The configuration |
59 | 58 | * @var array<string, mixed> |
@@ -64,8 +63,7 @@ discard block |
||
64 | 63 | * Create new instance |
65 | 64 | * @param array<string, mixed> $configurations |
66 | 65 | */ |
67 | - public function __construct(array $configurations = []) |
|
68 | - { |
|
66 | + public function __construct(array $configurations = []) { |
|
69 | 67 | $this->configurations = $configurations; |
70 | 68 | } |
71 | 69 |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | * @class StrictTransportSecurityPolicy |
53 | 53 | * @package Platine\Framework\Security\Policy |
54 | 54 | */ |
55 | -class StrictTransportSecurityPolicy extends AbstractPolicy |
|
56 | -{ |
|
55 | +class StrictTransportSecurityPolicy extends AbstractPolicy { |
|
57 | 56 | /** |
58 | 57 | * {@inheritdoc} |
59 | 58 | */ |
@@ -63,12 +62,12 @@ discard block |
||
63 | 62 | $headers[] = $this->maxAge(); |
64 | 63 | |
65 | 64 | $includeSubDomains = $this->configurations['include-sub-domains'] ?? false; |
66 | - if ($includeSubDomains) { |
|
65 | + if ($includeSubDomains) { |
|
67 | 66 | $headers[] = 'includeSubDomains'; |
68 | 67 | } |
69 | 68 | |
70 | 69 | $preload = $this->configurations['preload'] ?? false; |
71 | - if ($preload) { |
|
70 | + if ($preload) { |
|
72 | 71 | $headers[] = 'preload'; |
73 | 72 | } |
74 | 73 |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class BaseCommand |
60 | 60 | * @package Platine\Framework\Console |
61 | 61 | */ |
62 | -abstract class BaseCommand extends Command |
|
63 | -{ |
|
62 | +abstract class BaseCommand extends Command { |
|
64 | 63 | /** |
65 | 64 | * The Application instance |
66 | 65 | * @var Application |
@@ -87,7 +86,7 @@ discard block |
||
87 | 86 | public function __construct( |
88 | 87 | Application $application, |
89 | 88 | Filesystem $filesystem |
90 | - ) { |
|
89 | + ) { |
|
91 | 90 | parent::__construct('make', 'Command to generate class skeleton'); |
92 | 91 | $this->application = $application; |
93 | 92 | $this->filesystem = $filesystem; |
@@ -101,7 +100,7 @@ discard block |
||
101 | 100 | */ |
102 | 101 | public function getClassBaseName($fullClassName): string |
103 | 102 | { |
104 | - if (is_object($fullClassName)) { |
|
103 | + if (is_object($fullClassName)) { |
|
105 | 104 | $fullClassName = get_class($fullClassName); |
106 | 105 | } |
107 | 106 | |
@@ -138,7 +137,7 @@ discard block |
||
138 | 137 | $classClean = ltrim($name, '/\\'); |
139 | 138 | $class = str_replace('/', '\\', $classClean); |
140 | 139 | |
141 | - if (Str::startsWith($this->rootNamespace, $class)) { |
|
140 | + if (Str::startsWith($this->rootNamespace, $class)) { |
|
142 | 141 | return $class; |
143 | 142 | } |
144 | 143 | |
@@ -203,9 +202,9 @@ discard block |
||
203 | 202 | { |
204 | 203 | $file = $this->filesystem->file($path); |
205 | 204 | $location = $file->getLocation(); |
206 | - if (!empty($location)) { |
|
205 | + if (!empty($location)) { |
|
207 | 206 | $directory = $this->filesystem->directory($location); |
208 | - if (!$directory->exists()) { |
|
207 | + if (!$directory->exists()) { |
|
209 | 208 | $directory->create('', 0775, true); |
210 | 209 | } |
211 | 210 | } |
@@ -220,13 +219,13 @@ discard block |
||
220 | 219 | */ |
221 | 220 | public function setReaderContent(Reader $reader, string $filename, $data): void |
222 | 221 | { |
223 | - if (is_array($data)) { |
|
222 | + if (is_array($data)) { |
|
224 | 223 | $data = implode(PHP_EOL, $data); |
225 | 224 | } |
226 | 225 | file_put_contents($filename, $data, FILE_APPEND); |
227 | 226 | |
228 | 227 | $resource = fopen($filename, 'r'); |
229 | - if ($resource === false) { |
|
228 | + if ($resource === false) { |
|
230 | 229 | throw new InvalidArgumentException(sprintf('Could not open filename [%s] for reading', $filename)); |
231 | 230 | } |
232 | 231 | $reader->setStream($resource); |
@@ -87,7 +87,7 @@ |
||
87 | 87 | ) { |
88 | 88 | parent::__construct($application, $filesystem); |
89 | 89 | $this->setName('make:provider') |
90 | - ->setDescription('Command to generate new service provider class'); |
|
90 | + ->setDescription('Command to generate new service provider class'); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @class MakeProviderCommand |
58 | 58 | * @package Platine\Framework\Console\Command |
59 | 59 | */ |
60 | -class MakeProviderCommand extends MakeCommand |
|
61 | -{ |
|
60 | +class MakeProviderCommand extends MakeCommand { |
|
62 | 61 | /** |
63 | 62 | * {@inheritdoc} |
64 | 63 | */ |
@@ -84,7 +83,7 @@ discard block |
||
84 | 83 | public function __construct( |
85 | 84 | Application $application, |
86 | 85 | Filesystem $filesystem |
87 | - ) { |
|
86 | + ) { |
|
88 | 87 | parent::__construct($application, $filesystem); |
89 | 88 | $this->setName('make:provider') |
90 | 89 | ->setDescription('Command to generate new service provider class'); |
@@ -158,7 +157,7 @@ discard block |
||
158 | 157 | protected function getBootBody(string $content): string |
159 | 158 | { |
160 | 159 | $result = ''; |
161 | - if ($this->useBoot) { |
|
160 | + if ($this->useBoot) { |
|
162 | 161 | $result = <<<EOF |
163 | 162 | /** |
164 | 163 | * {@inheritdoc} |
@@ -182,7 +181,7 @@ discard block |
||
182 | 181 | protected function getAddRoutesBody(string $content): string |
183 | 182 | { |
184 | 183 | $result = ''; |
185 | - if ($this->addRoutes) { |
|
184 | + if ($this->addRoutes) { |
|
186 | 185 | $result = <<<EOF |
187 | 186 | /** |
188 | 187 | * {@inheritdoc} |
@@ -203,7 +202,7 @@ discard block |
||
203 | 202 | */ |
204 | 203 | protected function getUsesContent(): string |
205 | 204 | { |
206 | - if (!$this->addRoutes) { |
|
205 | + if (!$this->addRoutes) { |
|
207 | 206 | return ''; |
208 | 207 | } |
209 | 208 |