@@ -57,7 +57,7 @@ |
||
| 57 | 57 | { |
| 58 | 58 | return $this->view->make($template, [ |
| 59 | 59 | 'states' => $this->getTableState(), |
| 60 | - 'action' => '\\' . $this->class . '@' |
|
| 60 | + 'action' => '\\'.$this->class.'@' |
|
| 61 | 61 | ]); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -28,18 +28,18 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function boot() |
| 30 | 30 | { |
| 31 | - $this->loadViewsFrom(__DIR__ . '/../../views', 'expendable'); |
|
| 32 | - $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'expendable'); |
|
| 31 | + $this->loadViewsFrom(__DIR__.'/../../views', 'expendable'); |
|
| 32 | + $this->loadTranslationsFrom(__DIR__.'/../../lang', 'expendable'); |
|
| 33 | 33 | $this->publishes([ |
| 34 | - __DIR__ . '/../../config/config.php' => config_path('expendable.php'), |
|
| 35 | - __DIR__ . '/../../database/migrations/' => base_path('/database/migrations'), |
|
| 36 | - __DIR__ . '/../../database/seeds/' => base_path('/database/seeds'), |
|
| 34 | + __DIR__.'/../../config/config.php' => config_path('expendable.php'), |
|
| 35 | + __DIR__.'/../../database/migrations/' => base_path('/database/migrations'), |
|
| 36 | + __DIR__.'/../../database/seeds/' => base_path('/database/seeds'), |
|
| 37 | 37 | ]); |
| 38 | 38 | $this->publishes([ |
| 39 | - __DIR__ . '/../../views' => base_path('resources/views/vendor/expendable'), |
|
| 39 | + __DIR__.'/../../views' => base_path('resources/views/vendor/expendable'), |
|
| 40 | 40 | ], 'views'); |
| 41 | 41 | $this->mergeConfigFrom( |
| 42 | - __DIR__ . '/../../config/config.php', 'expendable' |
|
| 42 | + __DIR__.'/../../config/config.php', 'expendable' |
|
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | $autoLoaderListener = new \Distilleries\Expendable\Register\ListenerAutoLoader(config('expendable.listener')); |
@@ -120,13 +120,13 @@ discard block |
||
| 120 | 120 | protected function registerCommands() |
| 121 | 121 | { |
| 122 | 122 | $file = app('files'); |
| 123 | - $files = $file->allFiles(__DIR__ . '/Console/'); |
|
| 123 | + $files = $file->allFiles(__DIR__.'/Console/'); |
|
| 124 | 124 | |
| 125 | 125 | foreach ($files as $file) |
| 126 | 126 | { |
| 127 | 127 | if (strpos($file->getPathName(), 'Lib') === false) |
| 128 | 128 | { |
| 129 | - $this->commands('Distilleries\Expendable\Console\\' . preg_replace('/\.php/i', '', $file->getFilename())); |
|
| 129 | + $this->commands('Distilleries\Expendable\Console\\'.preg_replace('/\.php/i', '', $file->getFilename())); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | } |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $allModels = [ |
| 48 | 48 | [ |
| 49 | - 'path' => app_path() . DIRECTORY_SEPARATOR, |
|
| 49 | + 'path' => app_path().DIRECTORY_SEPARATOR, |
|
| 50 | 50 | 'namespace' => '{{app}}', |
| 51 | 51 | ], |
| 52 | 52 | [ |
| 53 | - 'path' => __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Models' . DIRECTORY_SEPARATOR, |
|
| 53 | + 'path' => __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Models'.DIRECTORY_SEPARATOR, |
|
| 54 | 54 | 'namespace' => 'Distilleries\\Expendable\\Models\\', |
| 55 | 55 | ], |
| 56 | 56 | ]; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | $choice = explode('/', $model); |
| 65 | 65 | $model = preg_replace('/.php/i', '', last($choice)); |
| 66 | - $choices[$config['namespace'] . $model] = $model; |
|
| 66 | + $choices[$config['namespace'].$model] = $model; |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | protected function getUpdateRules() |
| 78 | 78 | { |
| 79 | 79 | $key = \Request::get($this->model->getKeyName()); |
| 80 | - static::$rules_update['email'] = 'required|email|unique:users,email,' . $key; |
|
| 80 | + static::$rules_update['email'] = 'required|email|unique:users,email,'.$key; |
|
| 81 | 81 | |
| 82 | 82 | return parent::getUpdateRules(); |
| 83 | 83 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | protected function getUpdateRules() |
| 45 | 45 | { |
| 46 | 46 | $key = \Request::get($this->model->getKeyName()); |
| 47 | - static::$rules['iso'] = 'required|unique:languages,iso,' . $key; |
|
| 47 | + static::$rules['iso'] = 'required|unique:languages,iso,'.$key; |
|
| 48 | 48 | |
| 49 | 49 | return parent::getUpdateRules(); |
| 50 | 50 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | public function getQualifiedStatusColumn() |
| 47 | 47 | { |
| 48 | - return $this->getTable() . '.' . $this->getStatusColumn(); |
|
| 48 | + return $this->getTable().'.'.$this->getStatusColumn(); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -14,11 +14,11 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function scopeWithoutCurrentLanguage($query) |
| 16 | 16 | {
|
| 17 | - return $query->where($this->getTable().'.iso','<>',app()->getLocale()); |
|
| 17 | + return $query->where($this->getTable().'.iso', '<>', app()->getLocale()); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function scopeWithTranslationElement($query) |
| 21 | 21 | {
|
| 22 | - return $query->where($this->getTable().'.iso','<>',app()->getLocale()); |
|
| 22 | + return $query->where($this->getTable().'.iso', '<>', app()->getLocale()); |
|
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | \ No newline at end of file |
@@ -53,8 +53,8 @@ |
||
| 53 | 53 | |
| 54 | 54 | public function scopeByElement($query, Model $model) |
| 55 | 55 | { |
| 56 | - return $query->where($this->getTable() . '.' . $this->getModelColumn(), '=', $model->getTable()) |
|
| 57 | - ->where($this->getTable() . '.' . $this->getIdSourceColumn(), '=', $model->getKey()); |
|
| 56 | + return $query->where($this->getTable().'.'.$this->getModelColumn(), '=', $model->getTable()) |
|
| 57 | + ->where($this->getTable().'.'.$this->getIdSourceColumn(), '=', $model->getKey()); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | foreach ($this->events as $name => $event) |
| 22 | 22 | { |
| 23 | - Event::listen($name, get_class($this) . '@' . $event['action'], $event['priority']); |
|
| 23 | + Event::listen($name, get_class($this).'@'.$event['action'], $event['priority']); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | } |