diff --git a/src/BoltPlugin.php b/src/BoltPlugin.php index 6a465ae5..f066633c 100644 --- a/src/BoltPlugin.php +++ b/src/BoltPlugin.php @@ -39,7 +39,7 @@ public function register(Panel $panel): void public static function make(): static { - return new self(); + return new self; } public static function get(): static diff --git a/src/Configuration.php b/src/Configuration.php index a123f13b..f4a0abcf 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -50,7 +50,7 @@ public function getCustomSchema(): array public static function getSchema(string $type): ?string { - return (new static())::get()->getCustomSchema()[$type]; + return (new static)::get()->getCustomSchema()[$type]; } public function boltModels(array $models): static @@ -69,7 +69,7 @@ public static function getModel(string $model): string { return array_merge( config('zeus-bolt.models'), - (new static())::get()->getBoltModels() + (new static)::get()->getBoltModels() )[$model]; } @@ -153,6 +153,6 @@ public function getShowNavigationBadges(?Resources $resource = null): bool public static function getNavigationBadgesVisibility(?Resources $resource = null): bool { - return (new static())::get()->getShowNavigationBadges($resource); + return (new static)::get()->getShowNavigationBadges($resource); } } diff --git a/src/Facades/Collectors.php b/src/Facades/Collectors.php index 15a3df32..cabfdf0a 100644 --- a/src/Facades/Collectors.php +++ b/src/Facades/Collectors.php @@ -25,7 +25,7 @@ protected static function buildClasses(array $classes): array { $allClasses = []; foreach ($classes as $class) { - $getClass = new $class(); + $getClass = new $class; if (! $getClass->disabled) { $allClasses[str($class)->explode('\\')->last()] = $getClass->toArray(); } @@ -39,7 +39,7 @@ public static function loadClasses(string $path, string $namespace): array $classes = []; $path = array_unique(Arr::wrap($path)); - foreach ((new Finder())->in($path)->files() as $className) { + foreach ((new Finder)->in($path)->files() as $className) { $classes[] = $namespace . $className->getFilenameWithoutExtension(); } diff --git a/src/Facades/Extensions.php b/src/Facades/Extensions.php index bfaf07f0..8b30f11d 100644 --- a/src/Facades/Extensions.php +++ b/src/Facades/Extensions.php @@ -11,7 +11,7 @@ public static function init(Form $form, string $hook, ?array $data = null, strin { if ($form->extensions !== null) { if (class_exists($form->extensions)) { - return (new $form->extensions())->{$hook}($form, $data, $action); + return (new $form->extensions)->{$hook}($form, $data, $action); } }