@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | public function boot() |
| 12 | 12 | { |
| 13 | - Builder::macro('if', function (bool $condition, string $column, string $operator, $value) { |
|
| 13 | + Builder::macro('if', function(bool $condition, string $column, string $operator, $value) { |
|
| 14 | 14 | if ($condition) { |
| 15 | 15 | return $this->where($column, $operator, $value); |
| 16 | 16 | } |
@@ -10,32 +10,32 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | public function register() |
| 12 | 12 | { |
| 13 | - Menu::macro('back', function () { |
|
| 13 | + Menu::macro('back', function() { |
|
| 14 | 14 | return Menu::new() |
| 15 | 15 | ->setActiveClass('-active') |
| 16 | 16 | ->setActiveFromRequest('/blender'); |
| 17 | 17 | }); |
| 18 | 18 | |
| 19 | - Menu::macro('moduleGroup', function ($title) { |
|
| 19 | + Menu::macro('moduleGroup', function($title) { |
|
| 20 | 20 | return Menu::back() |
| 21 | 21 | ->addParentClass('menu_group') |
| 22 | 22 | ->setParentAttribute('data-menu-group', fragment("back.nav.{$title}")) |
| 23 | - ->registerFilter(function (Link $link) { |
|
| 23 | + ->registerFilter(function(Link $link) { |
|
| 24 | 24 | $link->addParentClass('menu_group_item'); |
| 25 | 25 | }); |
| 26 | 26 | }); |
| 27 | 27 | |
| 28 | - Menu::macro('startSecondary', function () { |
|
| 29 | - return $this->registerFilter(function (Link $link) { |
|
| 28 | + Menu::macro('startSecondary', function() { |
|
| 29 | + return $this->registerFilter(function(Link $link) { |
|
| 30 | 30 | $link->addParentClass('-secondary'); |
| 31 | 31 | }); |
| 32 | 32 | }); |
| 33 | 33 | |
| 34 | - Menu::macro('module', function (string $action, string $name) { |
|
| 34 | + Menu::macro('module', function(string $action, string $name) { |
|
| 35 | 35 | return $this->action("Back\\{$action}", fragment("back.{$name}")); |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | - Menu::macro('backMain', function () { |
|
| 38 | + Menu::macro('backMain', function() { |
|
| 39 | 39 | return Menu::back() |
| 40 | 40 | ->addClass('menu_groups') |
| 41 | 41 | ->setAttribute('data-menu-groups') |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | ); |
| 68 | 68 | }); |
| 69 | 69 | |
| 70 | - Menu::macro('backUser', function () { |
|
| 70 | + Menu::macro('backUser', function() { |
|
| 71 | 71 | |
| 72 | 72 | $avatar = HTML::avatar(current_user(), '-small'). |
| 73 | 73 | el('span.:response-desktop-only', current_user()->email); |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | |
| 100 | 100 | public function locales(array $locales, string $current) : string |
| 101 | 101 | { |
| 102 | - $list = array_reduce($locales, function (array $list, string $locale) { |
|
| 102 | + $list = array_reduce($locales, function(array $list, string $locale) { |
|
| 103 | 103 | $list[$locale] = trans("locales.{$locale}"); |
| 104 | 104 | |
| 105 | 105 | return $list; |
@@ -2,24 +2,24 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | Route::demoAccess('/demo'); |
| 4 | 4 | |
| 5 | -Route::get('coming-soon', function () { |
|
| 5 | +Route::get('coming-soon', function() { |
|
| 6 | 6 | return view('temp/index'); |
| 7 | 7 | }); |
| 8 | 8 | |
| 9 | -Route::group(['namespace' => 'Back', 'prefix' => 'blender'], function () { |
|
| 9 | +Route::group(['namespace' => 'Back', 'prefix' => 'blender'], function() { |
|
| 10 | 10 | |
| 11 | 11 | require __DIR__.'/back_auth.php'; |
| 12 | 12 | |
| 13 | - Route::group(['middleware' => 'auth'], function () { |
|
| 13 | + Route::group(['middleware' => 'auth'], function() { |
|
| 14 | 14 | require __DIR__.'/back.php'; |
| 15 | 15 | }); |
| 16 | 16 | }); |
| 17 | 17 | |
| 18 | -Route::group(['namespace' => 'Front', 'middleware' => 'demoMode'], function () { |
|
| 18 | +Route::group(['namespace' => 'Front', 'middleware' => 'demoMode'], function() { |
|
| 19 | 19 | |
| 20 | 20 | $multiLingual = count(config('app.locales')) > 1; |
| 21 | 21 | |
| 22 | - Route::group($multiLingual ? ['prefix' => locale()] : [], function () { |
|
| 22 | + Route::group($multiLingual ? ['prefix' => locale()] : [], function() { |
|
| 23 | 23 | try { |
| 24 | 24 | require __DIR__.'/front_auth.php'; |
| 25 | 25 | require __DIR__.'/front.php'; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | }); |
| 30 | 30 | |
| 31 | 31 | if ($multiLingual) { |
| 32 | - Route::get('/', function () { |
|
| 32 | + Route::get('/', function() { |
|
| 33 | 33 | return redirect(locale()); |
| 34 | 34 | }); |
| 35 | 35 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public static function allAsRegex() : string |
| 24 | 24 | { |
| 25 | - return collect(static::values())->map(function ($value) { |
|
| 25 | + return collect(static::values())->map(function($value) { |
|
| 26 | 26 | return "({$value})"; |
| 27 | 27 | })->implode('|'); |
| 28 | 28 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function boot() |
| 15 | 15 | { |
| 16 | - Blade::directive('json', function ($expression) { |
|
| 16 | + Blade::directive('json', function($expression) { |
|
| 17 | 17 | return "<?php echo json_encode({$expression}); ?>"; |
| 18 | 18 | }); |
| 19 | 19 | } |
@@ -15,19 +15,19 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function register() |
| 17 | 17 | { |
| 18 | - Collection::macro('pipe', function ($callback) { |
|
| 18 | + Collection::macro('pipe', function($callback) { |
|
| 19 | 19 | return $callback($this); |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | - Collection::macro('ifEmpty', function ($callback) { |
|
| 22 | + Collection::macro('ifEmpty', function($callback) { |
|
| 23 | 23 | if ($this->empty()) { |
| 24 | 24 | $callback(); |
| 25 | 25 | } |
| 26 | 26 | return $this; |
| 27 | 27 | }); |
| 28 | 28 | |
| 29 | - Collection::macro('ifAny', function ($callback) { |
|
| 30 | - if (! $this->empty()) { |
|
| 29 | + Collection::macro('ifAny', function($callback) { |
|
| 30 | + if (!$this->empty()) { |
|
| 31 | 31 | $callback($this); |
| 32 | 32 | } |
| 33 | 33 | return $this; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $tags = Tag::getWithType($tagType); |
| 43 | 43 | |
| 44 | 44 | return $this->getAllOnline() |
| 45 | - ->groupBy(function (Model $model) use ($tagType) { |
|
| 45 | + ->groupBy(function(Model $model) use ($tagType) { |
|
| 46 | 46 | $firstTag = $model->tagsWithType($tagType)->first(); |
| 47 | 47 | |
| 48 | 48 | if (!$firstTag) { |
@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | return $firstTag->id; |
| 53 | 53 | }) |
| 54 | - ->map(function ($tagIdsWithModels, int $tagId) use ($tags) { |
|
| 54 | + ->map(function($tagIdsWithModels, int $tagId) use ($tags) { |
|
| 55 | 55 | return [ |
| 56 | 56 | 'tag' => $tags->get($tagId), |
| 57 | 57 | 'models' => collect($tagIdsWithModels)->values(), |
| 58 | 58 | ]; |
| 59 | 59 | }) |
| 60 | - ->sortBy(function (array $tagsAndModels) { |
|
| 60 | + ->sortBy(function(array $tagsAndModels) { |
|
| 61 | 61 | return $tagsAndModels['tag']->order_column; |
| 62 | 62 | }) |
| 63 | 63 | ->values(); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | $this->registerLoader(); |
| 16 | 16 | |
| 17 | - $this->app->singleton('translator', function ($app) { |
|
| 17 | + $this->app->singleton('translator', function($app) { |
|
| 18 | 18 | $loader = $app['translation.loader']; |
| 19 | 19 | |
| 20 | 20 | $locale = $app['config']['app.locale']; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | protected function registerLoader() |
| 31 | 31 | { |
| 32 | - $this->app->singleton('translation.loader', function ($app) { |
|
| 32 | + $this->app->singleton('translation.loader', function($app) { |
|
| 33 | 33 | return new TranslationLoader($app['files'], $app['path.lang']); |
| 34 | 34 | }); |
| 35 | 35 | } |