@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | public function getDecorator() |
| 20 | 20 | { |
| 21 | - return function ($row) { |
|
| 21 | + return function($row) { |
|
| 22 | 22 | return $this->presentable($row) |
| 23 | 23 | ? $this->present($row, $this->name) |
| 24 | 24 | : $this->render($row); |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | |
| 335 | 335 | $fillable = array_merge($fillable, $model->getDates()); |
| 336 | 336 | |
| 337 | - $fillable = array_filter($fillable, function ($element) use ($model) { |
|
| 337 | + $fillable = array_filter($fillable, function($element) use ($model) { |
|
| 338 | 338 | return !in_array($element, $model->getHidden(), true); |
| 339 | 339 | }); |
| 340 | 340 | |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | $aHeight = (int) array_get($attributes, 'height'); |
| 457 | 457 | |
| 458 | 458 | if (($aWidth || $aHeight) && $firstStyle) { |
| 459 | - $size = array_filter($styles, function ($style) use ($firstStyle) { |
|
| 459 | + $size = array_filter($styles, function($style) use ($firstStyle) { |
|
| 460 | 460 | return $style === $firstStyle; |
| 461 | 461 | }); |
| 462 | 462 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | $media = $this->getRepository()->getMedia( |
| 20 | 20 | $name = $this->getFormName() |
| 21 | - )->map(function ($item) { |
|
| 21 | + )->map(function($item) { |
|
| 22 | 22 | return array_merge($item->toArray(), [ |
| 23 | 23 | 'url' => $item->getUrl(), |
| 24 | 24 | 'conversions' => $this->conversions($item), |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | protected function conversions(\Spatie\MediaLibrary\Models\Media $item) |
| 40 | 40 | { |
| 41 | - return array_build($item->getMediaConversionNames(), function ($key, $conversion) use ($item) { |
|
| 41 | + return array_build($item->getMediaConversionNames(), function($key, $conversion) use ($item) { |
|
| 42 | 42 | return [$conversion, $item->getUrl($conversion)]; |
| 43 | 43 | }); |
| 44 | 44 | } |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | { |
| 94 | 94 | $this->validateEditor($editor); |
| 95 | 95 | |
| 96 | - return (bool) $this->filter(function ($field) use ($editor) { |
|
| 96 | + return (bool) $this->filter(function($field) use ($editor) { |
|
| 97 | 97 | if ('ckeditor' === $editor) { |
| 98 | 98 | return $field instanceof Ckeditor; |
| 99 | 99 | } |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | ], |
| 94 | 94 | ]; |
| 95 | 95 | |
| 96 | - array_walk($dependencies, function ($package, $provider) { |
|
| 96 | + array_walk($dependencies, function($package, $provider) { |
|
| 97 | 97 | if (is_string($package) && is_numeric($provider)) { |
| 98 | 98 | $provider = $package; |
| 99 | 99 | $package = null; |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | $files = $this->storage |
| 57 | 57 | ->files($directory) |
| 58 | - ->when($popup, function ($files) { |
|
| 58 | + ->when($popup, function($files) { |
|
| 59 | 59 | return $files->filter->isImage(); |
| 60 | 60 | }) |
| 61 | 61 | ->merge($this->storage->directories($directory)); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | public function move(Request $request) |
| 92 | 92 | { |
| 93 | 93 | $target = $request->get('target'); |
| 94 | - $files = array_filter($request->get('files'), function ($file) use ($target) { |
|
| 94 | + $files = array_filter($request->get('files'), function($file) use ($target) { |
|
| 95 | 95 | return $file !== $target; |
| 96 | 96 | }); |
| 97 | 97 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | // remove storage path from $directory |
| 149 | 149 | $directory = implode('/', array_slice(explode('/', $directory), 1)); |
| 150 | 150 | |
| 151 | - $this->breadcrumbs->register('index', function (Generator $generator) use ($popup) { |
|
| 151 | + $this->breadcrumbs->register('index', function(Generator $generator) use ($popup) { |
|
| 152 | 152 | $generator->push('Home', route('scaffold.media'.($popup ? '.popup' : ''))); |
| 153 | 153 | }); |
| 154 | 154 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | foreach ($dirs as $index => $dir) { |
| 160 | 160 | $tmpPath = $path; |
| 161 | 161 | $path[] = $dir; |
| 162 | - $this->breadcrumbs->register($section = implode('.', $path), function (Generator $generator) use (&$parent, $dir, $tmpPath, $dirs) { |
|
| 162 | + $this->breadcrumbs->register($section = implode('.', $path), function(Generator $generator) use (&$parent, $dir, $tmpPath, $dirs) { |
|
| 163 | 163 | $generator->parent($parent = implode('.', $tmpPath)); |
| 164 | 164 | $generator->push($dir, route('scaffold.media', ['path' => implode('/', array_slice($dirs, 0, -1))])); |
| 165 | 165 | }); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | return $rules($key); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - $rules = array_map(function ($rule) use ($key) { |
|
| 40 | + $rules = array_map(function($rule) use ($key) { |
|
| 41 | 41 | if (is_callable($rule)) { |
| 42 | 42 | $rule = $rule($key); |
| 43 | 43 | } |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function handle(Request $request, Closure $next) |
| 41 | 41 | { |
| 42 | - $this->collectModules(function ($fileInfo) { |
|
| 43 | - $this->resolveClass($fileInfo, function ($module) { |
|
| 42 | + $this->collectModules(function($fileInfo) { |
|
| 43 | + $this->resolveClass($fileInfo, function($module) { |
|
| 44 | 44 | if ($module instanceof Module) { |
| 45 | 45 | $this->registerModule($module); |
| 46 | 46 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | array_merge( |
| 127 | 127 | $module->linkAttributes(), |
| 128 | 128 | [ |
| 129 | - 'active' => function () use ($module) { |
|
| 129 | + 'active' => function() use ($module) { |
|
| 130 | 130 | return $this->isActive($module); |
| 131 | 131 | }, |
| 132 | 132 | ] |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | array_merge( |
| 141 | 141 | $module->linkAttributes(), |
| 142 | 142 | [ |
| 143 | - 'active' => function () use ($module) { |
|
| 143 | + 'active' => function() use ($module) { |
|
| 144 | 144 | return $module->showIf(); |
| 145 | 145 | }, |
| 146 | 146 | ] |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | protected function findOrCreateGroup(Module $module, MenuBuilder $navigation, $group) |
| 181 | 181 | { |
| 182 | 182 | if (!$sub = $navigation->whereTitle($group)) { |
| 183 | - $sub = $navigation->dropdown($group, function () { |
|
| 183 | + $sub = $navigation->dropdown($group, function() { |
|
| 184 | 184 | }, 99, ['id' => $module->url(), 'icon' => 'fa fa-folder']); |
| 185 | 185 | } |
| 186 | 186 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $module = $module->url(); |
| 194 | 194 | |
| 195 | 195 | if (!array_key_exists($module, $checked)) { |
| 196 | - $urls = array_map(function ($url) { |
|
| 196 | + $urls = array_map(function($url) { |
|
| 197 | 197 | return trim($url, '/'); |
| 198 | 198 | }, [ |
| 199 | 199 | 'current' => \URL::getRequest()->getPathInfo(), |
@@ -24,8 +24,8 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $badges = Collection::make([]); |
| 26 | 26 | |
| 27 | - $this->collectBadges(function ($fileInfo) use ($badges) { |
|
| 28 | - $this->resolveClass($fileInfo, function ($badge) use ($badges) { |
|
| 27 | + $this->collectBadges(function($fileInfo) use ($badges) { |
|
| 28 | + $this->resolveClass($fileInfo, function($badge) use ($badges) { |
|
| 29 | 29 | $badges->push($badge); |
| 30 | 30 | }); |
| 31 | 31 | }); |