@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | |
43 | 43 | protected function registerFragmentBreadcrumbs() |
44 | 44 | { |
45 | - BreadCrumbsManager::register('fragments', function ($breadcrumbs) { |
|
45 | + BreadCrumbsManager::register('fragments', function($breadcrumbs) { |
|
46 | 46 | $breadcrumbs->push(fragment('back.fragments.title'), action('Back\FragmentController@index')); |
47 | 47 | }); |
48 | 48 | |
49 | - BreadCrumbsManager::register('fragmentDetail', function ($breadcrumbs, $string) { |
|
49 | + BreadCrumbsManager::register('fragmentDetail', function($breadcrumbs, $string) { |
|
50 | 50 | $breadcrumbs->parent('fragments'); |
51 | 51 | $breadcrumbs->push($string->name, action('Back\FragmentController@edit', $string->id)); |
52 | 52 | }); |
@@ -54,30 +54,30 @@ discard block |
||
54 | 54 | |
55 | 55 | protected function registerUserBreadcrumbs() |
56 | 56 | { |
57 | - BreadCrumbsManager::register('backUserListBack', function ($breadcrumbs) { |
|
57 | + BreadCrumbsManager::register('backUserListBack', function($breadcrumbs) { |
|
58 | 58 | $breadcrumbs->push(fragment('back.backUsers.title'), action('Back\BackUserController@index')); |
59 | 59 | }); |
60 | 60 | |
61 | - BreadCrumbsManager::register('newBackUserBack', function ($breadcrumbs) { |
|
61 | + BreadCrumbsManager::register('newBackUserBack', function($breadcrumbs) { |
|
62 | 62 | $breadcrumbs->parent('backUserListBack'); |
63 | 63 | $breadcrumbs->push(fragment('back.backUsers.new'), action('Back\BackUserController@create')); |
64 | 64 | }); |
65 | 65 | |
66 | - BreadCrumbsManager::register('editBackUserBack', function ($breadcrumbs, $user) { |
|
66 | + BreadCrumbsManager::register('editBackUserBack', function($breadcrumbs, $user) { |
|
67 | 67 | $breadcrumbs->parent('backUserListBack', $user); |
68 | 68 | $breadcrumbs->push($user->present()->fullName, action('Back\BackUserController@edit', $user->id)); |
69 | 69 | }); |
70 | 70 | |
71 | - BreadCrumbsManager::register('frontUserListBack', function ($breadcrumbs) { |
|
71 | + BreadCrumbsManager::register('frontUserListBack', function($breadcrumbs) { |
|
72 | 72 | $breadcrumbs->push(fragment('back.frontUsers.title'), action('Back\FrontUserController@index')); |
73 | 73 | }); |
74 | 74 | |
75 | - BreadCrumbsManager::register('newFrontUserBack', function ($breadcrumbs) { |
|
75 | + BreadCrumbsManager::register('newFrontUserBack', function($breadcrumbs) { |
|
76 | 76 | $breadcrumbs->parent('frontUserListBack'); |
77 | 77 | $breadcrumbs->push(fragment('back.frontUsers.new'), action('Back\FrontUserController@create')); |
78 | 78 | }); |
79 | 79 | |
80 | - BreadCrumbsManager::register('editFrontUserBack', function ($breadcrumbs, $user) { |
|
80 | + BreadCrumbsManager::register('editFrontUserBack', function($breadcrumbs, $user) { |
|
81 | 81 | $breadcrumbs->parent('frontUserListBack', $user); |
82 | 82 | $breadcrumbs->push($user->present()->fullName, action('Back\FrontUserController@edit', $user->id)); |
83 | 83 | }); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | BreadCrumbsManager::register( |
95 | 95 | "{$singular}ListBack", |
96 | - function ($breadcrumbs) use ($ucname, $plural) { |
|
96 | + function($breadcrumbs) use ($ucname, $plural) { |
|
97 | 97 | $breadcrumbs->push( |
98 | 98 | fragment("back.{$plural}.title"), |
99 | 99 | action("Back\\{$ucname}Controller@index") |
@@ -103,12 +103,11 @@ discard block |
||
103 | 103 | |
104 | 104 | BreadCrumbsManager::register( |
105 | 105 | "{$singular}Back", |
106 | - function ($breadcrumbs, $model) use ($singular, $ucname, $plural) { |
|
106 | + function($breadcrumbs, $model) use ($singular, $ucname, $plural) { |
|
107 | 107 | $breadcrumbs->parent("{$singular}ListBack"); |
108 | 108 | |
109 | 109 | $breadcrumbs->push( |
110 | - $model->isDraft() ? fragment("back.{$plural}.new") : |
|
111 | - (isset($model->name) ? $model->name : ucfirst(fragment('back.change'))), |
|
110 | + $model->isDraft() ? fragment("back.{$plural}.new") : (isset($model->name) ? $model->name : ucfirst(fragment('back.change'))), |
|
112 | 111 | action("Back\\{$ucname}Controller@create") |
113 | 112 | ); |
114 | 113 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | /** |
27 | 27 | * Get the translation for the given locale. If it doesn't exist create it. |
28 | 28 | * |
29 | - * @param null $locale |
|
29 | + * @param string $locale |
|
30 | 30 | * @param bool $withFallback |
31 | 31 | * |
32 | 32 | * @return \Illuminate\Database\Eloquent\Model|null |
@@ -25,7 +25,7 @@ |
||
25 | 25 | return Fragment::query() |
26 | 26 | ->where('name', 'LIKE', "{$group}.%") |
27 | 27 | ->get() |
28 | - ->map(function (Fragment $fragment) use ($locale, $group) { |
|
28 | + ->map(function(Fragment $fragment) use ($locale, $group) { |
|
29 | 29 | return [ |
30 | 30 | 'key' => str_replace("{$group}.", '', $fragment->name), |
31 | 31 | 'text' => $fragment->translate($locale)->text, |
@@ -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 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | public function boot() |
16 | 16 | { |
17 | - Validator::extend('tags_exist', function ($attribute, $tagNames, $parameters) { |
|
17 | + Validator::extend('tags_exist', function($attribute, $tagNames, $parameters) { |
|
18 | 18 | list($tagType) = $parameters; |
19 | 19 | $tagType = new TagType($tagType); |
20 | 20 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | return true; |
31 | 31 | }); |
32 | 32 | |
33 | - Validator::extend('enum', function ($attribute, $value, $parameters) { |
|
33 | + Validator::extend('enum', function($attribute, $value, $parameters) { |
|
34 | 34 | |
35 | 35 | /** @var \App\Foundation\Models\Enums\Enum $class */ |
36 | 36 | $class = $parameters[0]; |