diff --git a/app/Locale/Presets/CountryPreset.php b/app/Locale/Presets/CountryPreset.php index aa70096be..b898315ad 100644 --- a/app/Locale/Presets/CountryPreset.php +++ b/app/Locale/Presets/CountryPreset.php @@ -4,17 +4,12 @@ namespace App\Builder\Presets; +use Moox\Builder\Blocks\Features\SimpleType; +use Moox\Builder\Blocks\Fields\KeyValue; +use Moox\Builder\Blocks\Fields\Number; use Moox\Builder\Blocks\Fields\Text; -use Moox\Builder\Blocks\Features\Tabs; use Moox\Builder\Blocks\Singles\Simple; -use Moox\Builder\Blocks\Fields\DateTime; -use Moox\Builder\Blocks\Fields\KeyValue; -use Moox\Builder\Blocks\Fields\TextArea; use Moox\Builder\Presets\AbstractPreset; -use Moox\Builder\Blocks\Features\SimpleType; -use Moox\Builder\Blocks\Features\SimpleStatus; -use Moox\Builder\Blocks\Fields\Boolean; -use Moox\Builder\Blocks\Fields\Number; class CountryPreset extends AbstractPreset { diff --git a/app/Locale/Presets/LocalePreset.php b/app/Locale/Presets/LocalePreset.php index b8bbc01b7..502a73c25 100644 --- a/app/Locale/Presets/LocalePreset.php +++ b/app/Locale/Presets/LocalePreset.php @@ -4,14 +4,11 @@ namespace App\Builder\Presets; -use Moox\Builder\Blocks\Fields\Text; use Moox\Builder\Blocks\Features\Tabs; +use Moox\Builder\Blocks\Fields\Relationship; +use Moox\Builder\Blocks\Fields\Text; use Moox\Builder\Blocks\Singles\Simple; -use Moox\Builder\Blocks\Fields\TextArea; use Moox\Builder\Presets\AbstractPreset; -use Moox\Builder\Blocks\Features\SimpleType; -use Moox\Builder\Blocks\Features\SimpleStatus; -use Moox\Builder\Blocks\Fields\Relationship; class LocalePreset extends AbstractPreset { diff --git a/app/Locale/Presets/StaticLanguagePreset.php b/app/Locale/Presets/StaticLanguagePreset.php index cfb99334f..e79034379 100644 --- a/app/Locale/Presets/StaticLanguagePreset.php +++ b/app/Locale/Presets/StaticLanguagePreset.php @@ -4,11 +4,11 @@ namespace App\Builder\Presets; +use Moox\Builder\Blocks\Features\SimpleType; +use Moox\Builder\Blocks\Fields\KeyValue; use Moox\Builder\Blocks\Fields\Text; use Moox\Builder\Blocks\Singles\Simple; -use Moox\Builder\Blocks\Fields\KeyValue; use Moox\Builder\Presets\AbstractPreset; -use Moox\Builder\Blocks\Features\SimpleType; class StaticLanguagePreset extends AbstractPreset { diff --git a/app/Locale/Resources/StaticCountryResource.php b/app/Locale/Resources/StaticCountryResource.php index 9f85a51ba..b045b042b 100644 --- a/app/Locale/Resources/StaticCountryResource.php +++ b/app/Locale/Resources/StaticCountryResource.php @@ -14,7 +14,6 @@ use Filament\Resources\Resource; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Filters\Filter; -use Filament\Tables\Filters\NumberFilter; use Filament\Tables\Filters\SelectFilter; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; @@ -189,7 +188,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['alpha2'], - fn(Builder $query, $value): Builder => $query->where('alpha2', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('alpha2', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -197,7 +196,7 @@ public static function table(Table $table): Table return null; } - return 'Alpha-2 Code: ' . $data['alpha2']; + return 'Alpha-2 Code: '.$data['alpha2']; }), Filter::make('alpha3_b') ->form([ @@ -208,7 +207,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['alpha3_b'], - fn(Builder $query, $value): Builder => $query->where('alpha3_b', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('alpha3_b', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -216,7 +215,7 @@ public static function table(Table $table): Table return null; } - return 'Alpha-3 Code (B): ' . $data['alpha3_b']; + return 'Alpha-3 Code (B): '.$data['alpha3_b']; }), Filter::make('alpha3_t') ->form([ @@ -227,7 +226,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['alpha3_t'], - fn(Builder $query, $value): Builder => $query->where('alpha3_t', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('alpha3_t', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -235,7 +234,7 @@ public static function table(Table $table): Table return null; } - return 'Alpha-3 Code (T): ' . $data['alpha3_t']; + return 'Alpha-3 Code (T): '.$data['alpha3_t']; }), Filter::make('common_name') ->form([ @@ -246,7 +245,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['common_name'], - fn(Builder $query, $value): Builder => $query->where('common_name', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('common_name', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -254,7 +253,7 @@ public static function table(Table $table): Table return null; } - return 'Common Name: ' . $data['common_name']; + return 'Common Name: '.$data['common_name']; }), Filter::make('native_name') ->form([ @@ -265,7 +264,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['native_name'], - fn(Builder $query, $value): Builder => $query->where('native_name', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('native_name', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -273,17 +272,17 @@ public static function table(Table $table): Table return null; } - return 'Native Name: ' . $data['native_name']; + return 'Native Name: '.$data['native_name']; }), Filter::make('has_exonyms') - ->query(fn($query) => $query->whereNotNull('exonyms')), + ->query(fn ($query) => $query->whereNotNull('exonyms')), SelectFilter::make('region') ->label('Region') - ->placeholder(__('core::core.filter') . ' Region') + ->placeholder(__('core::core.filter').' Region') ->options(['Africa' => 'Africa', 'Americas' => 'Americas', 'Asia' => 'Asia', 'Europe' => 'Europe', 'Oceania' => 'Oceania', 'Antarctica' => 'Antarctica']), SelectFilter::make('subregion') ->label('Subregion') - ->placeholder(__('core::core.filter') . ' Subregion') + ->placeholder(__('core::core.filter').' Subregion') ->options(['Northern Africa' => 'Northern Africa', 'Sub-Saharan Africa' => 'Sub-Saharan Africa', 'Eastern Africa' => 'Eastern Africa', 'Middle Africa' => 'Middle Africa', 'Southern Africa' => 'Southern Africa', 'Western Africa' => 'Western Africa', 'Latin America and the Caribbean' => 'Latin America and the Caribbean', 'Northern America' => 'Northern America', 'Caribbean' => 'Caribbean', 'Central America' => 'Central America', 'South America' => 'South America', 'Central Asia' => 'Central Asia', 'Eastern Asia' => 'Eastern Asia', 'South-Eastern Asia' => 'South-Eastern Asia', 'Southern Asia' => 'Southern Asia', 'Western Asia' => 'Western Asia', 'Eastern Europe' => 'Eastern Europe', 'Northern Europe' => 'Northern Europe', 'Southern Europe' => 'Southern Europe', 'Western Europe' => 'Western Europe', 'Australia and New Zealand' => 'Australia and New Zealand', 'Melanesia' => 'Melanesia', 'Micronesia' => 'Micronesia', 'Polynesia' => 'Polynesia']), Filter::make('capital') ->form([ @@ -294,7 +293,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['capital'], - fn(Builder $query, $value): Builder => $query->where('capital', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('capital', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -302,7 +301,7 @@ public static function table(Table $table): Table return null; } - return 'Capital: ' . $data['capital']; + return 'Capital: '.$data['capital']; }), Filter::make('population') ->form([ @@ -313,7 +312,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['population'], - fn(Builder $query, $value): Builder => $query->where('population', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('population', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -321,7 +320,7 @@ public static function table(Table $table): Table return null; } - return 'Population: ' . $data['population']; + return 'Population: '.$data['population']; }), Filter::make('area') ->form([ @@ -332,7 +331,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['area'], - fn(Builder $query, $value): Builder => $query->where('area', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('area', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -340,22 +339,22 @@ public static function table(Table $table): Table return null; } - return 'Area: ' . $data['area']; + return 'Area: '.$data['area']; }), Filter::make('has_links') - ->query(fn($query) => $query->whereNotNull('links')), + ->query(fn ($query) => $query->whereNotNull('links')), Filter::make('has_tlds') - ->query(fn($query) => $query->whereNotNull('tlds')), + ->query(fn ($query) => $query->whereNotNull('tlds')), Filter::make('has_membership') - ->query(fn($query) => $query->whereNotNull('membership')), + ->query(fn ($query) => $query->whereNotNull('membership')), SelectFilter::make('embargo') ->label('Embargo') - ->placeholder(__('core::core.filter') . ' Embargo') + ->placeholder(__('core::core.filter').' Embargo') ->options(['New' => 'New', 'Open' => 'Open', 'Pending' => 'Pending', 'Closed' => 'Closed']), Filter::make('has_embargo_data') - ->query(fn($query) => $query->whereNotNull('embargo_data')), + ->query(fn ($query) => $query->whereNotNull('embargo_data')), Filter::make('has_address_format') - ->query(fn($query) => $query->whereNotNull('address_format')), + ->query(fn ($query) => $query->whereNotNull('address_format')), Filter::make('postal_code_regex') ->form([ TextInput::make('postal_code_regex') @@ -365,7 +364,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['postal_code_regex'], - fn(Builder $query, $value): Builder => $query->where('postal_code_regex', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('postal_code_regex', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -373,7 +372,7 @@ public static function table(Table $table): Table return null; } - return 'Postal Code Regex: ' . $data['postal_code_regex']; + return 'Postal Code Regex: '.$data['postal_code_regex']; }), Filter::make('dialing_prefix') ->form([ @@ -384,7 +383,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['dialing_prefix'], - fn(Builder $query, $value): Builder => $query->where('dialing_prefix', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('dialing_prefix', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -392,10 +391,10 @@ public static function table(Table $table): Table return null; } - return 'Dialing Prefix: ' . $data['dialing_prefix']; + return 'Dialing Prefix: '.$data['dialing_prefix']; }), Filter::make('has_phone_number_formatting') - ->query(fn($query) => $query->whereNotNull('phone_number_formatting')), + ->query(fn ($query) => $query->whereNotNull('phone_number_formatting')), Filter::make('date_format') ->form([ TextInput::make('date_format') @@ -405,7 +404,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['date_format'], - fn(Builder $query, $value): Builder => $query->where('date_format', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('date_format', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -413,10 +412,10 @@ public static function table(Table $table): Table return null; } - return 'Date Format: ' . $data['date_format']; + return 'Date Format: '.$data['date_format']; }), Filter::make('has_currency_format') - ->query(fn($query) => $query->whereNotNull('currency_format')), + ->query(fn ($query) => $query->whereNotNull('currency_format')), ]); } diff --git a/app/Locale/Resources/StaticLanguageResource.php b/app/Locale/Resources/StaticLanguageResource.php index 1766ff955..9ff790f68 100644 --- a/app/Locale/Resources/StaticLanguageResource.php +++ b/app/Locale/Resources/StaticLanguageResource.php @@ -141,7 +141,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['alpha2'], - fn(Builder $query, $value): Builder => $query->where('alpha2', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('alpha2', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -149,7 +149,7 @@ public static function table(Table $table): Table return null; } - return 'Alpha-2 Code: ' . $data['alpha2']; + return 'Alpha-2 Code: '.$data['alpha2']; }), Filter::make('alpha3_b') ->form([ @@ -160,7 +160,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['alpha3_b'], - fn(Builder $query, $value): Builder => $query->where('alpha3_b', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('alpha3_b', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -168,7 +168,7 @@ public static function table(Table $table): Table return null; } - return 'Alpha-3 Bibliographic Code: ' . $data['alpha3_b']; + return 'Alpha-3 Bibliographic Code: '.$data['alpha3_b']; }), Filter::make('alpha3_t') ->form([ @@ -179,7 +179,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['alpha3_t'], - fn(Builder $query, $value): Builder => $query->where('alpha3_t', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('alpha3_t', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -187,7 +187,7 @@ public static function table(Table $table): Table return null; } - return 'Alpha-3 Terminology Code: ' . $data['alpha3_t']; + return 'Alpha-3 Terminology Code: '.$data['alpha3_t']; }), Filter::make('common_name') ->form([ @@ -198,7 +198,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['common_name'], - fn(Builder $query, $value): Builder => $query->where('common_name', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('common_name', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -206,7 +206,7 @@ public static function table(Table $table): Table return null; } - return 'Common Name: ' . $data['common_name']; + return 'Common Name: '.$data['common_name']; }), Filter::make('native_name') ->form([ @@ -217,7 +217,7 @@ public static function table(Table $table): Table ->query(function (Builder $query, array $data): Builder { return $query->when( $data['native_name'], - fn(Builder $query, $value): Builder => $query->where('native_name', 'like', "%{$value}%"), + fn (Builder $query, $value): Builder => $query->where('native_name', 'like', "%{$value}%"), ); }) ->indicateUsing(function (array $data): ?string { @@ -225,15 +225,15 @@ public static function table(Table $table): Table return null; } - return 'Native Name: ' . $data['native_name']; + return 'Native Name: '.$data['native_name']; }), SelectFilter::make('script') ->label('Script') - ->placeholder(__('core::core.filter') . ' Script') + ->placeholder(__('core::core.filter').' Script') ->options(['Latin' => 'Latin', 'Cyrillic' => 'Cyrillic', 'Arabic' => 'Arabic', 'Devanagari' => 'Devanagari', 'Other' => 'Other']), SelectFilter::make('direction') ->label('Direction') - ->placeholder(__('core::core.filter') . ' Direction') + ->placeholder(__('core::core.filter').' Direction') ->options(['LTR' => 'LTR', 'RTL' => 'RTL']), ]); } diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index cee4fa44a..afcf683ed 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -122,7 +122,7 @@ public function panel(Panel $panel): Panel // Builder plugin \Moox\Builder\ItemPlugin::make(), \App\Locale\Plugins\StaticLanguagePlugin::make(), - \App\Locale\Plugins\StaticCountryPlugin::make() + \App\Locale\Plugins\StaticCountryPlugin::make(), ]); } diff --git a/config/builder.php b/config/builder.php index bb96165eb..4b22e05a8 100644 --- a/config/builder.php +++ b/config/builder.php @@ -25,40 +25,40 @@ 'model' => [ 'path' => '%BasePath%\Models', 'namespace' => '%BaseNamespace%\\Models', - 'template' => __DIR__ . '/../src/Templates/Entity/model.php.stub', + 'template' => __DIR__.'/../src/Templates/Entity/model.php.stub', 'generator' => \Moox\Builder\Generators\Entity\ModelGenerator::class, ], 'resource' => [ 'path' => '%BasePath%\Resources', 'namespace' => '%BaseNamespace%\\Resources', - 'template' => __DIR__ . '/../src/Templates/Entity/resource.php.stub', + 'template' => __DIR__.'/../src/Templates/Entity/resource.php.stub', 'page_templates' => [ - 'List' => __DIR__ . '/../src/Templates/Entity/pages/list.php.stub', - 'Create' => __DIR__ . '/../src/Templates/Entity/pages/create.php.stub', - 'Edit' => __DIR__ . '/../src/Templates/Entity/pages/edit.php.stub', - 'View' => __DIR__ . '/../src/Templates/Entity/pages/view.php.stub', + 'List' => __DIR__.'/../src/Templates/Entity/pages/list.php.stub', + 'Create' => __DIR__.'/../src/Templates/Entity/pages/create.php.stub', + 'Edit' => __DIR__.'/../src/Templates/Entity/pages/edit.php.stub', + 'View' => __DIR__.'/../src/Templates/Entity/pages/view.php.stub', ], 'generator' => \Moox\Builder\Generators\Entity\ResourceGenerator::class, ], 'migration' => [ 'path' => 'database\migrations', - 'template' => __DIR__ . '/../src/Templates/Entity/migration.php.stub', + 'template' => __DIR__.'/../src/Templates/Entity/migration.php.stub', 'generator' => \Moox\Builder\Generators\Entity\MigrationGenerator::class, ], 'plugin' => [ 'path' => '%BasePath%\Filament\Plugins', 'namespace' => '%BaseNamespace%\\Filament\\Plugins', - 'template' => __DIR__ . '/../src/Templates/Entity/plugin.php.stub', + 'template' => __DIR__.'/../src/Templates/Entity/plugin.php.stub', 'generator' => \Moox\Builder\Generators\Entity\PluginGenerator::class, ], 'translation' => [ 'path' => 'lang\%locale%\entities', - 'template' => __DIR__ . '/../src/Templates/Entity/translation.php.stub', + 'template' => __DIR__.'/../src/Templates/Entity/translation.php.stub', 'generator' => \Moox\Builder\Generators\Entity\TranslationGenerator::class, ], 'config' => [ 'path' => 'config\entities', - 'template' => __DIR__ . '/../src/Templates/Entity/config.php.stub', + 'template' => __DIR__.'/../src/Templates/Entity/config.php.stub', 'generator' => \Moox\Builder\Generators\Entity\ConfigGenerator::class, ], ], @@ -70,25 +70,25 @@ 'model' => [ 'path' => '%BasePath%\app\Locale\Models', 'namespace' => '%BaseNamespace%\\Locale\\Models', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/model.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/model.php.stub', 'generator' => \Moox\Builder\Generators\Entity\ModelGenerator::class, ], 'resource' => [ 'path' => '%BasePath%\app\Locale\Resources', 'namespace' => '%BaseNamespace%\\Locale\\Resources', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/resource.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/resource.php.stub', 'page_templates' => [ - 'List' => __DIR__ . '/../packages/builder/src/Templates/Entity/pages/list.php.stub', - 'Create' => __DIR__ . '/../packages/builder/src/Templates/Entity/pages/create.php.stub', - 'Edit' => __DIR__ . '/../packages/builder/src/Templates/Entity/pages/edit.php.stub', - 'View' => __DIR__ . '/../packages/builder/src/Templates/Entity/pages/view.php.stub', + 'List' => __DIR__.'/../packages/builder/src/Templates/Entity/pages/list.php.stub', + 'Create' => __DIR__.'/../packages/builder/src/Templates/Entity/pages/create.php.stub', + 'Edit' => __DIR__.'/../packages/builder/src/Templates/Entity/pages/edit.php.stub', + 'View' => __DIR__.'/../packages/builder/src/Templates/Entity/pages/view.php.stub', ], 'generator' => \Moox\Builder\Generators\Entity\ResourceGenerator::class, ], 'plugin' => [ 'path' => '%BasePath%\app\Locale\Plugins', 'namespace' => '%BaseNamespace%\\Locale\\Plugins', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/plugin.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/plugin.php.stub', 'generator' => \Moox\Builder\Generators\Entity\PluginGenerator::class, ], //'migration' => [ @@ -98,12 +98,12 @@ //], 'translation' => [ 'path' => '%BasePath%\app\Locale\lang\%locale%\entities', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/translation.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/translation.php.stub', 'generator' => \Moox\Builder\Generators\Entity\TranslationGenerator::class, ], 'config' => [ 'path' => '%BasePath%\app\Locale\config\entities', - 'template' => __DIR__ . '/../src/Templates/Entity/config.php.stub', + 'template' => __DIR__.'/../src/Templates/Entity/config.php.stub', 'generator' => \Moox\Builder\Generators\Entity\ConfigGenerator::class, ], ], @@ -162,40 +162,40 @@ 'model' => [ 'path' => '%BasePath%\Locale\Models', 'namespace' => '%BaseNamespace%\\Locale\\Models', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/model.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/model.php.stub', 'generator' => \Moox\Builder\Generators\Entity\ModelGenerator::class, ], 'resource' => [ 'path' => '%BasePath%\Locale\Resources', 'namespace' => '%BaseNamespace%\\Locale\\Resources', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/resource.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/resource.php.stub', 'page_templates' => [ - 'List' => __DIR__ . '/../packages/builder/src/Templates/Entity/pages/list.php.stub', - 'Create' => __DIR__ . '/../packages/builder/src/Templates/Entity/pages/create.php.stub', - 'Edit' => __DIR__ . '/../packages/builder/src/Templates/Entity/pages/edit.php.stub', - 'View' => __DIR__ . '/../packages/builder/src/Templates/Entity/pages/view.php.stub', + 'List' => __DIR__.'/../packages/builder/src/Templates/Entity/pages/list.php.stub', + 'Create' => __DIR__.'/../packages/builder/src/Templates/Entity/pages/create.php.stub', + 'Edit' => __DIR__.'/../packages/builder/src/Templates/Entity/pages/edit.php.stub', + 'View' => __DIR__.'/../packages/builder/src/Templates/Entity/pages/view.php.stub', ], 'generator' => \Moox\Builder\Generators\Entity\ResourceGenerator::class, ], 'plugin' => [ 'path' => '%BasePath%\Locale\Plugins', 'namespace' => '%BaseNamespace%\\Locale\\Plugins', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/plugin.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/plugin.php.stub', 'generator' => \Moox\Builder\Generators\Entity\PluginGenerator::class, ], 'translation' => [ 'path' => '%BasePath%\Locale\lang\%locale%\previews', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/translation.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/translation.php.stub', 'generator' => \Moox\Builder\Generators\Entity\TranslationGenerator::class, ], 'config' => [ 'path' => '%BasePath%\Locale\config\previews', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/config.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/config.php.stub', 'generator' => \Moox\Builder\Generators\Entity\ConfigGenerator::class, ], 'migration' => [ 'path' => '%BasePath%\Locale\database\migrations', - 'template' => __DIR__ . '/../packages/builder/src/Templates/Entity/migration.php.stub', + 'template' => __DIR__.'/../packages/builder/src/Templates/Entity/migration.php.stub', 'generator' => \Moox\Builder\Generators\Entity\MigrationGenerator::class, ], ], diff --git a/database/seeders/StaticCountrySeeder.php b/database/seeders/StaticCountrySeeder.php index 6a6763bed..56111f372 100644 --- a/database/seeders/StaticCountrySeeder.php +++ b/database/seeders/StaticCountrySeeder.php @@ -2,7 +2,6 @@ namespace Database\Seeders; -use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class StaticCountrySeeder extends Seeder diff --git a/database/seeders/StaticLanguageSeeder.php b/database/seeders/StaticLanguageSeeder.php index e4bfbd20b..53577e885 100644 --- a/database/seeders/StaticLanguageSeeder.php +++ b/database/seeders/StaticLanguageSeeder.php @@ -2,7 +2,6 @@ namespace Database\Seeders; -use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class StaticLanguageSeeder extends Seeder @@ -221,7 +220,7 @@ public function run(): void ]), 'native_name' => 'हिन्दी', 'script' => 'Devanagari', - ] + ], ]); } } diff --git a/packages/builder/src/Generators/Entity/PluginGenerator.php b/packages/builder/src/Generators/Entity/PluginGenerator.php index 6a0726915..88cc90a93 100644 --- a/packages/builder/src/Generators/Entity/PluginGenerator.php +++ b/packages/builder/src/Generators/Entity/PluginGenerator.php @@ -32,14 +32,14 @@ public function generate(): void ]; $content = $this->replaceTemplateVariables($template, $variables); - $path = $this->context->getPath('plugin') . '/' . - $this->context->getEntityName() . 'Plugin.php'; + $path = $this->context->getPath('plugin').'/'. + $this->context->getEntityName().'Plugin.php'; $this->writeFile($path, $content); } protected function getResources(): string { - return $this->context->getEntityName() . 'Resource::class'; + return $this->context->getEntityName().'Resource::class'; } protected function getBootMethods(): string @@ -55,11 +55,11 @@ protected function getGeneratorType(): string protected function formatUseStatements(): string { $statements = [ - 'use ' . $this->context->getNamespace('resource') . '\\' . $this->context->getEntityName() . 'Resource;', + 'use '.$this->context->getNamespace('resource').'\\'.$this->context->getEntityName().'Resource;', ]; return implode("\n", array_map(function ($statement) { - return rtrim($statement, ';') . ';'; + return rtrim($statement, ';').';'; }, array_unique($statements))); } }