@@ -26,7 +26,7 @@ |
||
| 26 | 26 | * @param string|array $name |
| 27 | 27 | * @param string|null $component |
| 28 | 28 | */ |
| 29 | - public function register($name, string $component= null): void; |
|
| 29 | + public function register($name, string $component = null): void; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Check if a component is registered. |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $this->page = $this->resolvePage(); |
| 42 | 42 | |
| 43 | - Paginator::currentPageResolver(function () { |
|
| 43 | + Paginator::currentPageResolver(function() { |
|
| 44 | 44 | return $this->page; |
| 45 | 45 | }); |
| 46 | 46 | |
@@ -26,8 +26,9 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | protected function passesAuthorization(): bool |
| 28 | 28 | { |
| 29 | - if (method_exists($this, 'authorize')) |
|
| 30 | - return app()->call([$this, 'authorize']); |
|
| 29 | + if (method_exists($this, 'authorize')) { |
|
| 30 | + return app()->call([$this, 'authorize']); |
|
| 31 | + } |
|
| 31 | 32 | |
| 32 | 33 | return true; |
| 33 | 34 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function sortBy(string $field): void |
| 37 | 37 | { |
| 38 | - $this->sortAsc = $this->sortField === $field ? (! $this->sortAsc) : true; |
|
| 38 | + $this->sortAsc = $this->sortField === $field ? ( ! $this->sortAsc) : true; |
|
| 39 | 39 | $this->sortField = $field; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -56,10 +56,10 @@ |
||
| 56 | 56 | $reflection = new ReflectionClass($this); |
| 57 | 57 | |
| 58 | 58 | static::$propertyCache[$class] = Collection::make($reflection->getProperties(ReflectionProperty::IS_PUBLIC)) |
| 59 | - ->reject(function (ReflectionProperty $property) { |
|
| 59 | + ->reject(function(ReflectionProperty $property) { |
|
| 60 | 60 | return $this->shouldIgnore($property->getName()); |
| 61 | 61 | }) |
| 62 | - ->map(function (ReflectionProperty $property) { |
|
| 62 | + ->map(function(ReflectionProperty $property) { |
|
| 63 | 63 | return $property->getName(); |
| 64 | 64 | }) |
| 65 | 65 | ->all(); |
@@ -32,8 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | if ($type === 'method') { |
| 34 | 34 | $this->handleMethodAction($payload['method'], $payload['params']); |
| 35 | - } |
|
| 36 | - elseif ($type === 'model') { |
|
| 35 | + } elseif ($type === 'model') { |
|
| 37 | 36 | $this->handleModelAction($payload['name'], $payload['value']); |
| 38 | 37 | } |
| 39 | 38 | } |
@@ -60,8 +59,9 @@ discard block |
||
| 60 | 59 | { |
| 61 | 60 | $method = 'updating'.Str::studly($property); |
| 62 | 61 | |
| 63 | - if (method_exists($this, $method)) |
|
| 64 | - $this->$method(); |
|
| 62 | + if (method_exists($this, $method)) { |
|
| 63 | + $this->$method(); |
|
| 64 | + } |
|
| 65 | 65 | |
| 66 | 66 | $this->{$property} = $value; |
| 67 | 67 | } |
@@ -42,8 +42,9 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $data = $this->data(); |
| 44 | 44 | |
| 45 | - if (method_exists($this, 'initializeWithPagination')) |
|
| 46 | - $this->initializeWithPagination(); |
|
| 45 | + if (method_exists($this, 'initializeWithPagination')) { |
|
| 46 | + $this->initializeWithPagination(); |
|
| 47 | + } |
|
| 47 | 48 | |
| 48 | 49 | /** @var \Illuminate\View\View $view */ |
| 49 | 50 | $view = app()->call([$this, 'render']); |
@@ -87,8 +88,9 @@ discard block |
||
| 87 | 88 | |
| 88 | 89 | $actions = (array) $request->input('actions'); |
| 89 | 90 | |
| 90 | - if ( ! empty($actions)) |
|
| 91 | - $this->handleComponentActions($actions); |
|
| 91 | + if ( ! empty($actions)) { |
|
| 92 | + $this->handleComponentActions($actions); |
|
| 93 | + } |
|
| 92 | 94 | |
| 93 | 95 | return $this; |
| 94 | 96 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | * @param string|array $name |
| 53 | 53 | * @param string|null $component |
| 54 | 54 | */ |
| 55 | - public function register($name, string $component= null): void |
|
| 55 | + public function register($name, string $component = null): void |
|
| 56 | 56 | { |
| 57 | 57 | if (is_array($name)) { |
| 58 | 58 | foreach ($name as $key => $class) { |
@@ -88,8 +88,9 @@ |
||
| 88 | 88 | */ |
| 89 | 89 | public function make(string $name): Component |
| 90 | 90 | { |
| 91 | - if ( ! $this->hasComponent($name)) |
|
| 92 | - throw ComponentNotFound::make($name); |
|
| 91 | + if ( ! $this->hasComponent($name)) { |
|
| 92 | + throw ComponentNotFound::make($name); |
|
| 93 | + } |
|
| 93 | 94 | |
| 94 | 95 | return $this->app->make($this->components[$name]); |
| 95 | 96 | } |
@@ -105,11 +105,11 @@ |
||
| 105 | 105 | */ |
| 106 | 106 | protected function registerModuleManifest(): void |
| 107 | 107 | { |
| 108 | - $this->singleton(PackageManifest::class, function (Application $app) { |
|
| 108 | + $this->singleton(PackageManifest::class, function(Application $app) { |
|
| 109 | 109 | return new PackageManifest(new Filesystem, $app->basePath()); |
| 110 | 110 | }); |
| 111 | 111 | |
| 112 | - $this->singleton(ModuleManifest::class, function (Application $app) { |
|
| 112 | + $this->singleton(ModuleManifest::class, function(Application $app) { |
|
| 113 | 113 | return new ModuleManifest( |
| 114 | 114 | new Filesystem, $app->basePath(), $app->bootstrapPath(Arcanesoft::ARCANESOFT_MODULES_CACHE) |
| 115 | 115 | ); |