@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | public function getStub() |
| 25 | 25 | { |
| 26 | 26 | if ($this->hasArgument('name')) { |
| 27 | - return __DIR__.'/stubs/FullService.stub'; |
|
| 27 | + return __DIR__ . '/stubs/FullService.stub'; |
|
| 28 | 28 | } else { |
| 29 | - return __DIR__.'/stubs/PlainService.stub'; |
|
| 29 | + return __DIR__ . '/stubs/PlainService.stub'; |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |
@@ -37,11 +37,11 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function getFilename() |
| 39 | 39 | { |
| 40 | - return Helper::getFileName($this->argument('name')).'.php'; |
|
| 40 | + return Helper::getFileName($this->argument('name')) . '.php'; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function getPath() |
| 44 | 44 | { |
| 45 | - return \app_path('Services/'.Helper::getDirName($this->argument('name'))); |
|
| 45 | + return \app_path('Services/' . Helper::getDirName($this->argument('name'))); |
|
| 46 | 46 | } |
| 47 | 47 | } |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | protected function makeFile() |
| 38 | 38 | { |
| 39 | 39 | $this->makeDir(); |
| 40 | - if (! $this->filesystem->isFile($this->getPath().'/'.$this->getFilename())) { |
|
| 41 | - $this->warn(Helper::getFileName($this->argument('name')).' created'); |
|
| 40 | + if (!$this->filesystem->isFile($this->getPath() . '/' . $this->getFilename())) { |
|
| 41 | + $this->warn(Helper::getFileName($this->argument('name')) . ' created'); |
|
| 42 | 42 | |
| 43 | - return $this->filesystem->put($this->getPath().'/'.$this->getFilename(), $this->getReplaceContent()); |
|
| 43 | + return $this->filesystem->put($this->getPath() . '/' . $this->getFilename(), $this->getReplaceContent()); |
|
| 44 | 44 | } else { |
| 45 | - $this->warn(Helper::getFileName($this->argument('name')).' already exist'); |
|
| 45 | + $this->warn(Helper::getFileName($this->argument('name')) . ' already exist'); |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | protected function makeDir() |
| 53 | 53 | { |
| 54 | - if (! $this->filesystem->isDirectory($this->getPath())) { |
|
| 54 | + if (!$this->filesystem->isDirectory($this->getPath())) { |
|
| 55 | 55 | return $this->filesystem->makeDirectory($this->getPath(), 0755, true); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public static function getDates($date) |
| 39 | 39 | { |
| 40 | - if (! $date instanceof Carbon) { |
|
| 40 | + if (!$date instanceof Carbon) { |
|
| 41 | 41 | $date = Carbon::parse($date); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | array_pop($pieces); |
| 78 | 78 | if (count($pieces)) { |
| 79 | 79 | if ($includeSlash) { |
| 80 | - return '\\'.implode('\\', $pieces); |
|
| 80 | + return '\\' . implode('\\', $pieces); |
|
| 81 | 81 | } else { |
| 82 | 82 | return implode('\\', $pieces); |
| 83 | 83 | } |
@@ -88,6 +88,6 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | public static function getModelNamespace(string $modelName): string |
| 90 | 90 | { |
| 91 | - return 'App\\'.\str_replace(self::$strRlc, '\\', $modelName); |
|
| 91 | + return 'App\\' . \str_replace(self::$strRlc, '\\', $modelName); |
|
| 92 | 92 | } |
| 93 | 93 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | return [ |
| 27 | 27 | 'email' => 'required|email', |
| 28 | - 'password' => 'required|string|min:'.config('larastart.password_min_length', 6), |
|
| 28 | + 'password' => 'required|string|min:' . config('larastart.password_min_length', 6), |
|
| 29 | 29 | ]; |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | public function successResponse() |
| 13 | 13 | { |
| 14 | - return function ($message, array $data = [], int $statusCode = 200) { |
|
| 14 | + return function($message, array $data = [], int $statusCode = 200) { |
|
| 15 | 15 | return response()->json(array_merge([ |
| 16 | 16 | 'success' => true, |
| 17 | 17 | 'message' => $message, |
@@ -6,15 +6,15 @@ discard block |
||
| 6 | 6 | { |
| 7 | 7 | public function attemptLogin(array $credentials = [], string $guard = 'api') |
| 8 | 8 | { |
| 9 | - if (! count($credentials)) { |
|
| 9 | + if (!count($credentials)) { |
|
| 10 | 10 | $credentials = request(['email', 'password']); |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | - if (! $guard) { |
|
| 13 | + if (!$guard) { |
|
| 14 | 14 | $guard = config('larastart.guard'); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | - if (! $token = auth($guard)->attempt($credentials)) { |
|
| 17 | + if (!$token = auth($guard)->attempt($credentials)) { |
|
| 18 | 18 | return $this->validationFailed(); |
| 19 | 19 | } |
| 20 | 20 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | $class = config('larastart.resource'); |
| 36 | 36 | |
| 37 | - if (! $guard) { |
|
| 37 | + if (!$guard) { |
|
| 38 | 38 | $guard = config('larastart.guard'); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -20,10 +20,10 @@ |
||
| 20 | 20 | { |
| 21 | 21 | ResponseFactory::mixin(new ResponseMixin()); |
| 22 | 22 | |
| 23 | - $this->mergeConfigFrom(__DIR__.'/../../config/larastart.php', 'larastart'); |
|
| 23 | + $this->mergeConfigFrom(__DIR__ . '/../../config/larastart.php', 'larastart'); |
|
| 24 | 24 | |
| 25 | 25 | $this->publishes([ |
| 26 | - __DIR__.'/../../config/larastart.php' => config_path('larastart.php'), |
|
| 26 | + __DIR__ . '/../../config/larastart.php' => config_path('larastart.php'), |
|
| 27 | 27 | ], 'larastart-config'); |
| 28 | 28 | |
| 29 | 29 | $this->commands([ |