@@ -63,9 +63,9 @@ |
||
| 63 | 63 | {{ uctrans('field.'.$column['name'], $module) }} |
| 64 | 64 | <?php |
| 65 | 65 | // If a special template exists, use it. Else use the generic template |
| 66 | - $uitypeViewName = sprintf('uitypes.search.%s', $column['uitype']); |
|
| 66 | + $uitypeViewName = sprintf('uitypes.search.%s', $column[ 'uitype' ]); |
|
| 67 | 67 | $uitypeFallbackView = 'uccello::modules.default.uitypes.search.text'; |
| 68 | - $uitypeViewToInclude = uccello()->view($column['package'], $module, $uitypeViewName, $uitypeFallbackView); |
|
| 68 | + $uitypeViewToInclude = uccello()->view($column[ 'package' ], $module, $uitypeViewName, $uitypeFallbackView); |
|
| 69 | 69 | ?> |
| 70 | 70 | @include($uitypeViewToInclude) |
| 71 | 71 | </th> |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | {{-- Badge --}} |
| 84 | 84 | <?php |
| 85 | 85 | $relatedModule = $relatedlist->relatedModule; |
| 86 | - $countMethod = $relatedlist->method . 'Count'; |
|
| 86 | + $countMethod = $relatedlist->method.'Count'; |
|
| 87 | 87 | |
| 88 | 88 | $model = new $relatedModule->model_class; |
| 89 | 89 | $count = $model->$countMethod($relatedlist, $record->id); |
@@ -13,34 +13,34 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | class AppServiceProvider extends ServiceProvider |
| 15 | 15 | { |
| 16 | - /** |
|
| 17 | - * Indicates if loading of the provider is deferred. |
|
| 18 | - * |
|
| 19 | - * @var bool |
|
| 20 | - */ |
|
| 21 | - protected $defer = false; |
|
| 16 | + /** |
|
| 17 | + * Indicates if loading of the provider is deferred. |
|
| 18 | + * |
|
| 19 | + * @var bool |
|
| 20 | + */ |
|
| 21 | + protected $defer = false; |
|
| 22 | 22 | |
| 23 | - public function boot() |
|
| 24 | - { |
|
| 23 | + public function boot() |
|
| 24 | + { |
|
| 25 | 25 | // For compatibility |
| 26 | 26 | Schema::defaultStringLength(191); |
| 27 | 27 | |
| 28 | 28 | // Config |
| 29 | 29 | $this->publishes([ |
| 30 | - __DIR__ . '/../../config/uccello.php' => config_path('uccello.php'), |
|
| 30 | + __DIR__ . '/../../config/uccello.php' => config_path('uccello.php'), |
|
| 31 | 31 | ], 'config'); |
| 32 | 32 | |
| 33 | 33 | // Views |
| 34 | 34 | $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'uccello'); |
| 35 | 35 | $this->publishes([ |
| 36 | - __DIR__ . '/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 36 | + __DIR__ . '/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 37 | 37 | ], 'views'); |
| 38 | 38 | |
| 39 | 39 | // Publish assets |
| 40 | 40 | $this->publishes([ |
| 41 | - __DIR__ . '/../../public' => public_path('vendor/uccello/uccello'), |
|
| 42 | - __DIR__ . '/../../public/fonts/vendor' => public_path('fonts/vendor'), |
|
| 43 | - __DIR__ . '/../../public/images/vendor' => public_path('images/vendor') |
|
| 41 | + __DIR__ . '/../../public' => public_path('vendor/uccello/uccello'), |
|
| 42 | + __DIR__ . '/../../public/fonts/vendor' => public_path('fonts/vendor'), |
|
| 43 | + __DIR__ . '/../../public/images/vendor' => public_path('images/vendor') |
|
| 44 | 44 | ], 'assets'); |
| 45 | 45 | |
| 46 | 46 | // Translations |
@@ -51,37 +51,37 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | // Commands |
| 53 | 53 | if ($this->app->runningInConsole()) { |
| 54 | - $this->commands([ |
|
| 54 | + $this->commands([ |
|
| 55 | 55 | UccelloInstallCommand::class, |
| 56 | - ]); |
|
| 56 | + ]); |
|
| 57 | + } |
|
| 57 | 58 | } |
| 58 | - } |
|
| 59 | 59 | |
| 60 | - public function register() |
|
| 61 | - { |
|
| 60 | + public function register() |
|
| 61 | + { |
|
| 62 | 62 | // Config |
| 63 | 63 | $this->mergeConfigFrom( |
| 64 | - __DIR__ . '/../../config/uccello.php', |
|
| 65 | - 'uccello' |
|
| 64 | + __DIR__ . '/../../config/uccello.php', |
|
| 65 | + 'uccello' |
|
| 66 | 66 | ); |
| 67 | 67 | |
| 68 | 68 | // Helper |
| 69 | 69 | App::bind('uccello', function () { |
| 70 | - return new \Uccello\Core\Helpers\Uccello; |
|
| 70 | + return new \Uccello\Core\Helpers\Uccello; |
|
| 71 | 71 | }); |
| 72 | 72 | |
| 73 | 73 | // Factories |
| 74 | 74 | $this->registerEloquentFactoriesFrom(__DIR__.'/../../database/factories'); |
| 75 | - } |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | - /** |
|
| 78 | - * Register factories. |
|
| 79 | - * |
|
| 80 | - * @param string $path |
|
| 81 | - * @return void |
|
| 82 | - */ |
|
| 83 | - protected function registerEloquentFactoriesFrom($path) |
|
| 84 | - { |
|
| 85 | - $this->app->make(EloquentFactory::class)->load($path); |
|
| 86 | - } |
|
| 77 | + /** |
|
| 78 | + * Register factories. |
|
| 79 | + * |
|
| 80 | + * @param string $path |
|
| 81 | + * @return void |
|
| 82 | + */ |
|
| 83 | + protected function registerEloquentFactoriesFrom($path) |
|
| 84 | + { |
|
| 85 | + $this->app->make(EloquentFactory::class)->load($path); |
|
| 86 | + } |
|
| 87 | 87 | } |
| 88 | 88 | \ No newline at end of file |
@@ -27,27 +27,27 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | // Config |
| 29 | 29 | $this->publishes([ |
| 30 | - __DIR__ . '/../../config/uccello.php' => config_path('uccello.php'), |
|
| 30 | + __DIR__.'/../../config/uccello.php' => config_path('uccello.php'), |
|
| 31 | 31 | ], 'config'); |
| 32 | 32 | |
| 33 | 33 | // Views |
| 34 | - $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'uccello'); |
|
| 34 | + $this->loadViewsFrom(__DIR__.'/../../resources/views', 'uccello'); |
|
| 35 | 35 | $this->publishes([ |
| 36 | - __DIR__ . '/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 36 | + __DIR__.'/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 37 | 37 | ], 'views'); |
| 38 | 38 | |
| 39 | 39 | // Publish assets |
| 40 | 40 | $this->publishes([ |
| 41 | - __DIR__ . '/../../public' => public_path('vendor/uccello/uccello'), |
|
| 42 | - __DIR__ . '/../../public/fonts/vendor' => public_path('fonts/vendor'), |
|
| 43 | - __DIR__ . '/../../public/images/vendor' => public_path('images/vendor') |
|
| 41 | + __DIR__.'/../../public' => public_path('vendor/uccello/uccello'), |
|
| 42 | + __DIR__.'/../../public/fonts/vendor' => public_path('fonts/vendor'), |
|
| 43 | + __DIR__.'/../../public/images/vendor' => public_path('images/vendor') |
|
| 44 | 44 | ], 'assets'); |
| 45 | 45 | |
| 46 | 46 | // Translations |
| 47 | - $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'uccello'); |
|
| 47 | + $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'uccello'); |
|
| 48 | 48 | |
| 49 | 49 | // Migrations |
| 50 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
| 50 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
| 51 | 51 | |
| 52 | 52 | // Commands |
| 53 | 53 | if ($this->app->runningInConsole()) { |
@@ -61,12 +61,12 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | // Config |
| 63 | 63 | $this->mergeConfigFrom( |
| 64 | - __DIR__ . '/../../config/uccello.php', |
|
| 64 | + __DIR__.'/../../config/uccello.php', |
|
| 65 | 65 | 'uccello' |
| 66 | 66 | ); |
| 67 | 67 | |
| 68 | 68 | // Helper |
| 69 | - App::bind('uccello', function () { |
|
| 69 | + App::bind('uccello', function() { |
|
| 70 | 70 | return new \Uccello\Core\Helpers\Uccello; |
| 71 | 71 | }); |
| 72 | 72 | |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | // Pre-process |
| 39 | 39 | $this->preProcess($domain, $module, $request); |
| 40 | 40 | |
| 41 | - $mainModules = []; |
|
| 42 | - $adminModules = []; |
|
| 41 | + $mainModules = [ ]; |
|
| 42 | + $adminModules = [ ]; |
|
| 43 | 43 | foreach (Module::orderBy('id')->get() as $_module) { |
| 44 | 44 | if ($_module->isAdminModule()) { |
| 45 | - $adminModules[] = $_module; |
|
| 45 | + $adminModules[ ] = $_module; |
|
| 46 | 46 | } else { |
| 47 | - $mainModules[] = $_module; |
|
| 47 | + $mainModules[ ] = $_module; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
@@ -101,12 +101,12 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | // Add message if defined |
| 103 | 103 | if (!empty($message)) { |
| 104 | - $result['message'] = uctrans($message, $module); |
|
| 104 | + $result[ 'message' ] = uctrans($message, $module); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | // Add error if defined |
| 108 | 108 | if (!empty($error)) { |
| 109 | - $result['error'] = uctrans($error, $module); |
|
| 109 | + $result[ 'error' ] = uctrans($error, $module); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | return $result; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * |
| 29 | 29 | * @return void |
| 30 | 30 | */ |
| 31 | - public function __construct(Domain $domain, Module $module, Request $request, $record, $isFromApi=false) |
|
| 31 | + public function __construct(Domain $domain, Module $module, Request $request, $record, $isFromApi = false) |
|
| 32 | 32 | { |
| 33 | 33 | $this->domain = $domain; |
| 34 | 34 | $this->module = $module; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @see Uccello\Core\Helpers\Uccello |
| 28 | 28 | */ |
| 29 | - function uctrans($key = null, ? Module $module = null, $replace = [], $locale = null) |
|
| 29 | + function uctrans($key = null, ? Module $module = null, $replace = [ ], $locale = null) |
|
| 30 | 30 | { |
| 31 | 31 | return app('uccello')->trans($key, $module, $replace, $locale); |
| 32 | 32 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * @param boolean $absolute |
| 57 | 57 | * @return string |
| 58 | 58 | */ |
| 59 | - function ucroute($name, $domain = null, $module = null, $parameters = [], $absolute = true) : string |
|
| 59 | + function ucroute($name, $domain = null, $module = null, $parameters = [ ], $absolute = true) : string |
|
| 60 | 60 | { |
| 61 | 61 | return app('uccello')->route($name, $domain, $module, $parameters, $absolute); |
| 62 | 62 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * @param string $package |
| 123 | 123 | * @return void |
| 124 | 124 | */ |
| 125 | - function ucasset($path, $package='uccello/uccello') |
|
| 125 | + function ucasset($path, $package = 'uccello/uccello') |
|
| 126 | 126 | { |
| 127 | 127 | return asset("vendor/$package/$path"); |
| 128 | 128 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // Get the menu to display according to the environment (main or admin) |
| 81 | 81 | $domainMenu = $this->getDomainMenuToDisplay(); |
| 82 | 82 | |
| 83 | - $this->menuAddedModules = []; |
|
| 83 | + $this->menuAddedModules = [ ]; |
|
| 84 | 84 | |
| 85 | 85 | // If a menu was created, use it |
| 86 | 86 | if (!is_null($domainMenu)) { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | if (!empty($menuLink->module)) { |
| 199 | 199 | if (!in_array($menuLink->module, $this->menuAddedModules)) { |
| 200 | - $this->menuAddedModules[] = $menuLink->module; |
|
| 200 | + $this->menuAddedModules[ ] = $menuLink->module; |
|
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | |
@@ -246,11 +246,11 @@ discard block |
||
| 246 | 246 | |
| 247 | 247 | // Link html |
| 248 | 248 | $link = Html::raw( |
| 249 | - '<a href="'. $url .'" class="'. $class .'">'. |
|
| 249 | + '<a href="'.$url.'" class="'.$class.'">'. |
|
| 250 | 250 | // (!$isInSubMenu ? '<i class="material-icons">'. $icon .'</i>' : ''). |
| 251 | 251 | // (!$isInSubMenu ? '<span>'. $label .'</span>' : $label). |
| 252 | - '<i class="material-icons">'. $icon .'</i>'. |
|
| 253 | - '<span>'. $label .'</span>'. |
|
| 252 | + '<i class="material-icons">'.$icon.'</i>'. |
|
| 253 | + '<span>'.$label.'</span>'. |
|
| 254 | 254 | '</a>' |
| 255 | 255 | )->setActive($isActive); |
| 256 | 256 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -$factory->define(\Uccello\Core\Models\User::class, function (Faker $faker) { |
|
| 16 | +$factory->define(\Uccello\Core\Models\User::class, function(Faker $faker) { |
|
| 17 | 17 | return [ |
| 18 | 18 | 'username' => $faker->name, |
| 19 | 19 | 'first_name' => $faker->firstName, |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -$factory->define(\Uccello\Core\Models\Module::class, function (Faker $faker) { |
|
| 16 | +$factory->define(\Uccello\Core\Models\Module::class, function(Faker $faker) { |
|
| 17 | 17 | |
| 18 | 18 | return [ |
| 19 | 19 | 'name' => $faker->name, |