@@ -11,14 +11,14 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | public function up() |
| 13 | 13 | { |
| 14 | - Schema::create('block__blocks', function (Blueprint $table) { |
|
| 14 | + Schema::create('block__blocks', function(Blueprint $table) { |
|
| 15 | 15 | $table->engine = 'InnoDB'; |
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->string('name'); |
| 18 | 18 | $table->timestamps(); |
| 19 | 19 | }); |
| 20 | 20 | |
| 21 | - Schema::create('block__blocks_translations', function (Blueprint $table) { |
|
| 21 | + Schema::create('block__blocks_translations', function(Blueprint $table) { |
|
| 22 | 22 | $table->engine = 'InnoDB'; |
| 23 | 23 | $table->increments('id'); |
| 24 | 24 | $table->tinyInteger('online')->nullable(); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $table->integer('block_id')->unsigned(); |
| 28 | 28 | $table->string('locale')->index(); |
| 29 | - $table->unique(['block_id', 'locale']); |
|
| 29 | + $table->unique([ 'block_id', 'locale' ]); |
|
| 30 | 30 | $table->foreign('block_id')->references('id')->on('block__blocks')->onDelete('cascade'); |
| 31 | 31 | }); |
| 32 | 32 | } |
@@ -32,6 +32,6 @@ |
||
| 32 | 32 | |
| 33 | 33 | public function messages() |
| 34 | 34 | { |
| 35 | - return []; |
|
| 35 | + return [ ]; |
|
| 36 | 36 | } |
| 37 | 37 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | @include('block::admin.blocks.partials.create-fields', ['lang' => $locale, '']) |
| 30 | 30 | </div> |
| 31 | 31 | <?php endforeach; ?> |
| 32 | - <?php if (config('asgard.block.config.partials.normal.create') !== []): ?> |
|
| 32 | + <?php if (config('asgard.block.config.partials.normal.create') !== [ ]): ?> |
|
| 33 | 33 | <?php foreach (config('asgard.block.config.partials.normal.create') as $partial): ?> |
| 34 | 34 | @include($partial) |
| 35 | 35 | <?php endforeach; ?> |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | {!! Form::i18nCheckbox('online', trans('block::blocks.online'), $errors, $lang) !!} |
| 5 | 5 | |
| 6 | - <?php if (config('asgard.block.config.partials.translatable.create') !== []): ?> |
|
| 6 | + <?php if (config('asgard.block.config.partials.translatable.create') !== [ ]): ?> |
|
| 7 | 7 | <?php foreach (config('asgard.block.config.partials.translatable.create') as $partial): ?> |
| 8 | 8 | @include($partial) |
| 9 | 9 | <?php endforeach; ?> |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | {!! Form::i18nCheckbox('online', trans('block::blocks.online'), $errors, $lang, $block) !!} |
| 5 | 5 | |
| 6 | - <?php if (config('asgard.block.config.partials.translatable.edit') !== []): ?> |
|
| 6 | + <?php if (config('asgard.block.config.partials.translatable.edit') !== [ ]): ?> |
|
| 7 | 7 | <?php foreach (config('asgard.block.config.partials.translatable.edit') as $partial): ?> |
| 8 | 8 | @include($partial) |
| 9 | 9 | <?php endforeach; ?> |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | @include('block::admin.blocks.partials.edit-fields', ['lang' => $locale]) |
| 30 | 30 | </div> |
| 31 | 31 | <?php endforeach; ?> |
| 32 | - <?php if (config('asgard.block.config.partials.normal.edit') !== []): ?> |
|
| 32 | + <?php if (config('asgard.block.config.partials.normal.edit') !== [ ]): ?> |
|
| 33 | 33 | <?php foreach (config('asgard.block.config.partials.normal.edit') as $partial): ?> |
| 34 | 34 | @include($partial) |
| 35 | 35 | <?php endforeach; ?> |
@@ -10,8 +10,8 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | protected $presenter = 'Modules\Block\Presenters\BlockPresenter'; |
| 12 | 12 | protected $table = 'block__blocks'; |
| 13 | - public $translatedAttributes = ['online', 'body']; |
|
| 14 | - protected $fillable = ['name', 'online', 'body']; |
|
| 13 | + public $translatedAttributes = [ 'online', 'body' ]; |
|
| 14 | + protected $fillable = [ 'name', 'online', 'body' ]; |
|
| 15 | 15 | protected $casts = [ |
| 16 | 16 | 'online' => 'bool', |
| 17 | 17 | ]; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public function __call($method, $parameters) |
| 20 | 20 | { |
| 21 | 21 | #i: Convert array to dot notation |
| 22 | - $config = implode('.', ['asgard.block.config.relations', $method]); |
|
| 22 | + $config = implode('.', [ 'asgard.block.config.relations', $method ]); |
|
| 23 | 23 | |
| 24 | 24 | #i: Relation method resolver |
| 25 | 25 | if (config()->has($config)) { |
@@ -45,14 +45,14 @@ |
||
| 45 | 45 | |
| 46 | 46 | protected function getEnvironmentSetUp($app) |
| 47 | 47 | { |
| 48 | - $app['path.base'] = __DIR__ . '/..'; |
|
| 49 | - $app['config']->set('database.default', 'sqlite'); |
|
| 50 | - $app['config']->set('database.connections.sqlite', array( |
|
| 48 | + $app[ 'path.base' ] = __DIR__.'/..'; |
|
| 49 | + $app[ 'config' ]->set('database.default', 'sqlite'); |
|
| 50 | + $app[ 'config' ]->set('database.connections.sqlite', array( |
|
| 51 | 51 | 'driver' => 'sqlite', |
| 52 | 52 | 'database' => ':memory:', |
| 53 | 53 | 'prefix' => '', |
| 54 | 54 | )); |
| 55 | - $app['config']->set('translatable.locales', ['en', 'fr']); |
|
| 55 | + $app[ 'config' ]->set('translatable.locales', [ 'en', 'fr' ]); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | private function resetDatabase() |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | protected function getBackendRoute() |
| 25 | 25 | { |
| 26 | - return __DIR__ . '/../Http/backendRoutes.php'; |
|
| 26 | + return __DIR__.'/../Http/backendRoutes.php'; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |