@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $tmpfile = $this->createTmpFileWithRoute(); |
100 | 100 | $path = $this->getPath($tmpfile); |
101 | 101 | add_file_into_file($this->mountpoint(), $path, $dstFile = $this->destinationFile()); |
102 | - $this->info('Route ' . undot_path($link) . ' added to ' . $dstFile . '.'); |
|
102 | + $this->info('Route '.undot_path($link).' added to '.$dstFile.'.'); |
|
103 | 103 | $this->postActions(); |
104 | 104 | } |
105 | 105 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $link = $this->removeTrailingSlashIfExists($link); |
170 | 170 | $link = $this->removeDuplicatedTrailingSlashes($link); |
171 | 171 | foreach (Route::getRoutes() as $value) { |
172 | - if (in_array(strtoupper($this->option('method')), array_merge($value->methods(), ['ANY'])) && |
|
172 | + if (in_array(strtoupper($this->option('method')), array_merge($value->methods(), [ 'ANY' ])) && |
|
173 | 173 | $value->uri() === $link) { |
174 | 174 | return true; |
175 | 175 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | */ |
211 | 211 | protected function apiRouteExists($link) |
212 | 212 | { |
213 | - return $this->webRouteExists('api/v1/' . $link); |
|
213 | + return $this->webRouteExists('api/v1/'.$link); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | /** |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | */ |
234 | 234 | protected function getPath($tmpfile) |
235 | 235 | { |
236 | - return stream_get_meta_data($tmpfile)['uri']; |
|
236 | + return stream_get_meta_data($tmpfile)[ 'uri' ]; |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | /** |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | protected function getRouteCode() |
245 | 245 | { |
246 | 246 | $type = $this->option('type'); |
247 | - $class = isset(static::$lookup[$type]) |
|
248 | - ? static::$lookup[$type] |
|
247 | + $class = isset(static::$lookup[ $type ]) |
|
248 | + ? static::$lookup[ $type ] |
|
249 | 249 | : RegularRoute::class; |
250 | 250 | /** @var GeneratesCode $route */ |
251 | 251 | $route = new $class($this->compiler, $this->filesystem); |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | return $this->argument('action'); |
282 | 282 | } |
283 | 283 | if (strtolower($this->option('type')) != 'regular') { |
284 | - return $this->argument('link') . 'Controller'; |
|
284 | + return $this->argument('link').'Controller'; |
|
285 | 285 | } |
286 | 286 | return $this->argument('link'); |
287 | 287 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | */ |
301 | 301 | protected function validateMethod() |
302 | 302 | { |
303 | - if (! in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, ['ANY']))) { |
|
303 | + if (!in_array(strtoupper($this->option('method')), $methods = array_merge(Router::$verbs, [ 'ANY' ]))) { |
|
304 | 304 | throw new MethodNotAllowedException($methods); |
305 | 305 | } |
306 | 306 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | protected function validateType() |
312 | 312 | { |
313 | - if (! in_array(strtolower($this->option('type')), ['regular','controller','resource'])) { |
|
313 | + if (!in_array(strtolower($this->option('type')), [ 'regular', 'controller', 'resource' ])) { |
|
314 | 314 | throw new RouteTypeNotValid(); |
315 | 315 | } |
316 | 316 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | 'link' => $link = undot_path($this->argument('link')), |
348 | 348 | 'name' => ucfirst($link), |
349 | 349 | ]); |
350 | - $this->info('Menu entry ' . $link .' added to config/menu.php file.'); |
|
350 | + $this->info('Menu entry '.$link.' added to config/menu.php file.'); |
|
351 | 351 | } |
352 | 352 | |
353 | 353 | /** |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | Artisan::call('make:view', [ |
390 | 390 | 'name' => $name |
391 | 391 | ]); |
392 | - $this->info('View ' . undot_path($name) .'.blade.php created.'); |
|
392 | + $this->info('View '.undot_path($name).'.blade.php created.'); |
|
393 | 393 | } |
394 | 394 | |
395 | 395 | /** |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | 'name' => $controller = $this->controllerWithoutMethod($this->action()) |
402 | 402 | ]); |
403 | 403 | $this->addMethodToController($controller, $this->controllerMethod($this->action())); |
404 | - $this->info('Controller ' . $controller .' created.'); |
|
404 | + $this->info('Controller '.$controller.' created.'); |
|
405 | 405 | $this->createView($this->argument('link')); |
406 | 406 | } |
407 | 407 | |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | 'name' => $controller = $this->controllerWithoutMethod($this->action()), |
415 | 415 | '--resource' => true |
416 | 416 | ]); |
417 | - $this->info('Resource Controller ' . $controller .' created.'); |
|
417 | + $this->info('Resource Controller '.$controller.' created.'); |
|
418 | 418 | $this->createView($this->argument('link')); |
419 | 419 | } |
420 | 420 | |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | { |
429 | 429 | $tmpfile = $this->createTmpFileWithMethod($controllerMethod); |
430 | 430 | $path = $this->getPath($tmpfile); |
431 | - add_file_into_file('\/\/', $path, app_path('Http/Controllers/' . $controller . '.php')); |
|
431 | + add_file_into_file('\/\/', $path, app_path('Http/Controllers/'.$controller.'.php')); |
|
432 | 432 | } |
433 | 433 | |
434 | 434 | /** |
@@ -468,6 +468,6 @@ discard block |
||
468 | 468 | */ |
469 | 469 | protected function getMethodStubPath() |
470 | 470 | { |
471 | - return __DIR__ . '/stubs/method.stub'; |
|
471 | + return __DIR__.'/stubs/method.stub'; |
|
472 | 472 | } |
473 | 473 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function handle() |
39 | 39 | { |
40 | - $this->info('Running command ' . $command = $this->command()); |
|
40 | + $this->info('Running command '.$command = $this->command()); |
|
41 | 41 | passthru($command); |
42 | 42 | } |
43 | 43 | |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | */ |
49 | 49 | protected function command() |
50 | 50 | { |
51 | - $api = $this->option('api') ? ' --api ' : ''; |
|
52 | - $action = $this->argument('action') ? ' ' . $this->argument('action') . ' ' : ''; |
|
53 | - return 'php artisan make:route ' . $this->argument('link') . $action . ' --type=' . $this->option('type') . |
|
54 | - ' --method=' . $this->option('method') . |
|
55 | - $api . |
|
51 | + $api = $this->option('api') ? ' --api ' : ''; |
|
52 | + $action = $this->argument('action') ? ' '.$this->argument('action').' ' : ''; |
|
53 | + return 'php artisan make:route '.$this->argument('link').$action.' --type='.$this->option('type'). |
|
54 | + ' --method='.$this->option('method'). |
|
55 | + $api. |
|
56 | 56 | ' -a --menu'; |
57 | 57 | } |
58 | 58 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function handle() |
39 | 39 | { |
40 | - $this->info('Running command ' . $command = $this->command()); |
|
40 | + $this->info('Running command '.$command = $this->command()); |
|
41 | 41 | passthru($command); |
42 | 42 | } |
43 | 43 | |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | */ |
49 | 49 | protected function command() |
50 | 50 | { |
51 | - $api = $this->option('api') ? ' --api ' : ''; |
|
52 | - $action = $this->argument('action') ? ' ' . $this->argument('action') . ' ' : ''; |
|
53 | - return 'php artisan make:route ' . $this->argument('link') . $action . ' --type=' . $this->option('type') . |
|
54 | - ' --method=' . $this->option('method') . |
|
55 | - $api . |
|
51 | + $api = $this->option('api') ? ' --api ' : ''; |
|
52 | + $action = $this->argument('action') ? ' '.$this->argument('action').' ' : ''; |
|
53 | + return 'php artisan make:route '.$this->argument('link').$action.' --type='.$this->option('type'). |
|
54 | + ' --method='.$this->option('method'). |
|
55 | + $api. |
|
56 | 56 | ' -a --menu'; |
57 | 57 | } |
58 | 58 | } |
@@ -13,11 +13,11 @@ |
||
13 | 13 | | |
14 | 14 | */ |
15 | 15 | |
16 | -Route::middleware('auth:api')->get('/user', function (Request $request) { |
|
16 | +Route::middleware('auth:api')->get('/user', function(Request $request) { |
|
17 | 17 | return $request->user(); |
18 | 18 | }); |
19 | 19 | |
20 | -Route::group(['prefix' => 'v1','middleware' => 'auth:api'], function () { |
|
20 | +Route::group([ 'prefix' => 'v1', 'middleware' => 'auth:api' ], function() { |
|
21 | 21 | // Route::resource('task', 'TasksController'); |
22 | 22 | |
23 | 23 | //Please do not remove this if you want adminlte:route and adminlte:link commands to works correctly. |
@@ -57,8 +57,8 @@ |
||
57 | 57 | 'anotherlink' => 'Kolejny link', |
58 | 58 | 'multilevel' => 'Wielopoziomowy', |
59 | 59 | 'linklevel2' => 'Link w poziomie 2', |
60 | - 'birthday' => 'Langdon\'s Birthday',//it can't be translated to polish when it is split like that (I can but it won't be logical) |
|
61 | - 'birthdaydate' => 'Will be 23 on April 24th',//it can't be translated to polish when it is split like that (I can but it won't be logical) |
|
60 | + 'birthday' => 'Langdon\'s Birthday', //it can't be translated to polish when it is split like that (I can but it won't be logical) |
|
61 | + 'birthdaydate' => 'Will be 23 on April 24th', //it can't be translated to polish when it is split like that (I can but it won't be logical) |
|
62 | 62 | 'progress' => 'Postęp zadań', |
63 | 63 | 'customtemplate' => 'Niestandardowy projekt szablonu', |
64 | 64 | 'statstab' => 'Zawartość tablicy statystyk', |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('users', function (Blueprint $table) { |
|
16 | + Schema::table('users', function(Blueprint $table) { |
|
17 | 17 | $table->string('username')->unique()->nullable()->after('name'); |
18 | 18 | }); |
19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('users', function (Blueprint $table) { |
|
28 | + Schema::table('users', function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('username'); |
30 | 30 | }); |
31 | 31 | } |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | { |
54 | 54 | try { |
55 | 55 | $this->filesystem->make( |
56 | - $path = resource_path('views/' . $this->viewPath()), |
|
56 | + $path = resource_path('views/'.$this->viewPath()), |
|
57 | 57 | $this->filesystem->get($this->getStubPath()), |
58 | 58 | true |
59 | 59 | ); |
60 | - $this->info('File ' . $path . ' created'); |
|
60 | + $this->info('File '.$path.' created'); |
|
61 | 61 | } catch (\Exception $e) { |
62 | 62 | $this->error($e->getMessage()); |
63 | 63 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | protected function getStubPath() |
70 | 70 | { |
71 | - return __DIR__ . '/stubs/view.blade.php'; |
|
71 | + return __DIR__.'/stubs/view.blade.php'; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected function constructViewBladeName($name) |
91 | 91 | { |
92 | - return $this->dottedPathToSlashesPath($name) . '.blade.php'; |
|
92 | + return $this->dottedPathToSlashesPath($name).'.blade.php'; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -79,7 +79,7 @@ |
||
79 | 79 | ], 422); |
80 | 80 | } |
81 | 81 | return back()->withErrors( |
82 | - ['email' => trans($response)] |
|
82 | + [ 'email' => trans($response) ] |
|
83 | 83 | ); |
84 | 84 | } |
85 | 85 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | // database. Otherwise we will parse the error and return the response. |
39 | 39 | $response = $this->broker()->reset( |
40 | 40 | $this->credentials($request), |
41 | - function ($user, $password) { |
|
41 | + function($user, $password) { |
|
42 | 42 | $this->resetPassword($user, $password); |
43 | 43 | } |
44 | 44 | ); |
@@ -79,11 +79,11 @@ discard block |
||
79 | 79 | protected function sendResetFailedResponse(Request $request, $response) |
80 | 80 | { |
81 | 81 | if ($request->expectsJson()) { |
82 | - return new JsonResponse(['email' => trans($response) ], 422); |
|
82 | + return new JsonResponse([ 'email' => trans($response) ], 422); |
|
83 | 83 | } |
84 | 84 | return redirect()->back() |
85 | 85 | ->withInput($request->only('email')) |
86 | - ->withErrors(['email' => trans($response)]); |
|
86 | + ->withErrors([ 'email' => trans($response) ]); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | public function showResetForm(Request $request, $token = null) |
99 | 99 | { |
100 | 100 | return view('adminlte::auth.passwords.reset')->with( |
101 | - ['token' => $token, 'email' => $request->email] |
|
101 | + [ 'token' => $token, 'email' => $request->email ] |
|
102 | 102 | ); |
103 | 103 | } |
104 | 104 |