@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | } else { |
| 31 | 31 | $method = 'set'.ucfirst($name); |
| 32 | 32 | if (method_exists($this, 'set'.ucfirst($name))) { |
| 33 | - $this->attributes[$name] = $this->{$method}($value); |
|
| 33 | + $this->attributes[ $name ] = $this->{$method}($value); |
|
| 34 | 34 | } else { |
| 35 | - $this->attributes[$name] = $value; |
|
| 35 | + $this->attributes[ $name ] = $value; |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function __isset($name) |
| 69 | 69 | { |
| 70 | - return isset($this->attributes[$name]); |
|
| 70 | + return isset($this->attributes[ $name ]); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -75,6 +75,6 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function __unset($name) |
| 77 | 77 | { |
| 78 | - unset($this->attributes[$name]); |
|
| 78 | + unset($this->attributes[ $name ]); |
|
| 79 | 79 | } |
| 80 | 80 | } |
@@ -9,11 +9,11 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | protected static function bootOrderableModel() |
| 11 | 11 | { |
| 12 | - static::creating(function ($row) { |
|
| 12 | + static::creating(function($row) { |
|
| 13 | 13 | $row->updateOrderFieldOnCreate(); |
| 14 | 14 | }); |
| 15 | 15 | |
| 16 | - static::deleted(function ($row) { |
|
| 16 | + static::deleted(function($row) { |
|
| 17 | 17 | $row->updateOrderFieldOnDelete(); |
| 18 | 18 | }); |
| 19 | 19 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | 34 | foreach ($provider->sections() as $model => $section) { |
| 35 | - $this->callSilent('sleepingowl:section:make', ['name' => $section, 'model' => $model]); |
|
| 35 | + $this->callSilent('sleepingowl:section:make', [ 'name' => $section, 'model' => $model ]); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $this->info('Sections generated successfully!'); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | $userClass = $this->getUserClass(); |
| 55 | 55 | |
| 56 | - $headers = ['id', 'name', 'email']; |
|
| 56 | + $headers = [ 'id', 'name', 'email' ]; |
|
| 57 | 57 | $users = $userClass::get($headers); |
| 58 | 58 | |
| 59 | 59 | $this->table($headers, $users); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | return; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if (! is_null($userClass::where('email', $email)->first())) { |
|
| 72 | + if (!is_null($userClass::where('email', $email)->first())) { |
|
| 73 | 73 | $this->error("User with same email [{$email}] exists."); |
| 74 | 74 | |
| 75 | 75 | return; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | $confirm = $this->confirm("Are you sure want to delete user with id [{$id}]?", false); |
| 123 | - if (! $confirm) { |
|
| 123 | + if (!$confirm) { |
|
| 124 | 124 | return; |
| 125 | 125 | } |
| 126 | 126 | |
@@ -173,9 +173,9 @@ discard block |
||
| 173 | 173 | protected function getOptions() |
| 174 | 174 | { |
| 175 | 175 | return [ |
| 176 | - ['create', 'c', InputOption::VALUE_NONE, 'Create new user.'], |
|
| 177 | - ['delete', 'd', InputOption::VALUE_NONE, 'Delete user.'], |
|
| 178 | - ['password', 'p', InputOption::VALUE_NONE, 'Change user password.'], |
|
| 176 | + [ 'create', 'c', InputOption::VALUE_NONE, 'Create new user.' ], |
|
| 177 | + [ 'delete', 'd', InputOption::VALUE_NONE, 'Delete user.' ], |
|
| 178 | + [ 'password', 'p', InputOption::VALUE_NONE, 'Change user password.' ], |
|
| 179 | 179 | ]; |
| 180 | 180 | } |
| 181 | 181 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $title = $this->option('title'); |
| 39 | 39 | |
| 40 | - $this->call('vendor:publish', ['--provider' => SleepingOwlServiceProvider::class]); |
|
| 40 | + $this->call('vendor:publish', [ '--provider' => SleepingOwlServiceProvider::class ]); |
|
| 41 | 41 | |
| 42 | 42 | $this->publishConfig($title); |
| 43 | 43 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | $directory = config('sleeping_owl.bootstrapDirectory'); |
| 58 | 58 | |
| 59 | - if (! is_dir($directory)) { |
|
| 59 | + if (!is_dir($directory)) { |
|
| 60 | 60 | $this->files->makeDirectory($directory, 0755, true, true); |
| 61 | 61 | $this->line('<info>Admin bootstrap directory was created:</info> '.str_replace(base_path(), '', $directory)); |
| 62 | 62 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | $file = config('sleeping_owl.bootstrapDirectory').'/navigation.php'; |
| 71 | 71 | |
| 72 | - if (! file_exists($file)) { |
|
| 72 | + if (!file_exists($file)) { |
|
| 73 | 73 | $contents = $this->files->get(__DIR__.'/stubs/navigation.stub'); |
| 74 | 74 | $this->files->put($file, $contents); |
| 75 | 75 | $this->line('<info>Menu file was created:</info> '.str_replace(base_path(), '', $file)); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | protected function createBootstrapFile() |
| 83 | 83 | { |
| 84 | 84 | $file = config('sleeping_owl.bootstrapDirectory').'/bootstrap.php'; |
| 85 | - if (! file_exists($file)) { |
|
| 85 | + if (!file_exists($file)) { |
|
| 86 | 86 | $contents = $this->files->get(__DIR__.'/stubs/bootstrap.stub'); |
| 87 | 87 | $this->files->put($file, $contents); |
| 88 | 88 | $this->line('<info>Bootstrap file was created:</info> '.str_replace(base_path(), '', $file)); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | protected function createServiceProvider() |
| 93 | 93 | { |
| 94 | 94 | $file = app_path('Providers/AdminSectionsServiceProvider.php'); |
| 95 | - if (! file_exists($file)) { |
|
| 95 | + if (!file_exists($file)) { |
|
| 96 | 96 | $contents = $this->files->get(__DIR__.'/stubs/AdminSectionsServiceProvider.stub'); |
| 97 | 97 | $this->files->put($file, $contents); |
| 98 | 98 | $this->line('<info>AdminSectionsServiceProvider file was created:</info> '.str_replace(base_path(), '', $file)); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | protected function createRoutesFile() |
| 106 | 106 | { |
| 107 | 107 | $file = config('sleeping_owl.bootstrapDirectory').'/routes.php'; |
| 108 | - if (! file_exists($file)) { |
|
| 108 | + if (!file_exists($file)) { |
|
| 109 | 109 | $contents = $this->files->get(__DIR__.'/stubs/routes.stub'); |
| 110 | 110 | $this->files->put($file, $contents); |
| 111 | 111 | $this->line('<info>Bootstrap file was created:</info> '.str_replace(base_path(), '', $file)); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | protected function createPublicDefaultStructure() |
| 119 | 119 | { |
| 120 | 120 | $uploadsDirectory = public_path('images/uploads'); |
| 121 | - if (! is_dir($uploadsDirectory)) { |
|
| 121 | + if (!is_dir($uploadsDirectory)) { |
|
| 122 | 122 | $this->files->makeDirectory($uploadsDirectory, 0755, true, true); |
| 123 | 123 | } |
| 124 | 124 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | { |
| 133 | 133 | $file = config_path('sleeping_owl.php'); |
| 134 | 134 | |
| 135 | - if (! is_null($title)) { |
|
| 135 | + if (!is_null($title)) { |
|
| 136 | 136 | $contents = $this->files->get($file); |
| 137 | 137 | $contents = str_replace('Sleeping Owl administrator', $title, $contents); |
| 138 | 138 | $this->files->put($file, $contents); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | protected function getOptions() |
| 147 | 147 | { |
| 148 | 148 | return [ |
| 149 | - ['title', null, InputOption::VALUE_REQUIRED, 'Title for admin module.'], |
|
| 149 | + [ 'title', null, InputOption::VALUE_REQUIRED, 'Title for admin module.' ], |
|
| 150 | 150 | ]; |
| 151 | 151 | } |
| 152 | 152 | } |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | protected function getArguments() |
| 83 | 83 | { |
| 84 | 84 | $arguments = parent::getArguments(); |
| 85 | - $arguments[] = ['model', InputArgument::REQUIRED, 'The name of the model class']; |
|
| 85 | + $arguments[ ] = [ 'model', InputArgument::REQUIRED, 'The name of the model class' ]; |
|
| 86 | 86 | |
| 87 | 87 | return $arguments; |
| 88 | 88 | } |
@@ -32,8 +32,8 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function setPasswordAttribute($value) |
| 34 | 34 | { |
| 35 | - if (! empty($value)) { |
|
| 36 | - $this->attributes['password'] = bcrypt($value); |
|
| 35 | + if (!empty($value)) { |
|
| 36 | + $this->attributes[ 'password' ] = bcrypt($value); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | 'Sortable', |
| 20 | 20 | ]); |
| 21 | 21 | |
| 22 | - Meta::AddJs('adminScripts', route('admin.scripts'), ['libraries']); |
|
| 22 | + Meta::AddJs('adminScripts', route('admin.scripts'), [ 'libraries' ]); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
| 64 | 64 | */ |
| 65 | - public function view($view, $data = [], $mergeData = []) |
|
| 65 | + public function view($view, $data = [ ], $mergeData = [ ]) |
|
| 66 | 66 | { |
| 67 | 67 | if ($view instanceof \Illuminate\View\View) { |
| 68 | 68 | return $view->with($data); |
@@ -23,5 +23,5 @@ |
||
| 23 | 23 | * |
| 24 | 24 | * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View |
| 25 | 25 | */ |
| 26 | - public function view($view, $data = [], $mergeData = []); |
|
| 26 | + public function view($view, $data = [ ], $mergeData = [ ]); |
|
| 27 | 27 | } |