style updates

This commit is contained in:
Mark Gregory
2026-06-23 13:39:02 +01:00
parent e79cadc7f8
commit 3be4ff590f
129 changed files with 482 additions and 404 deletions
@@ -47,7 +47,7 @@ class PricingServiceProvider extends ServiceProvider
*/
protected function registerHelpers(): void
{
foreach (glob(__DIR__.'/../Helpers/*.php') as $filename) {
foreach (glob(__DIR__ . '/../Helpers/*.php') as $filename) {
require_once $filename;
}
}
@@ -60,10 +60,10 @@ class PricingServiceProvider extends ServiceProvider
if (! $this->app->runningInConsole()) {
return;
}
$commandPath = __DIR__.'/../Console';
$commandPath = __DIR__ . '/../Console';
$commands = collect(File::allFiles($commandPath))
->map(function ($file) {
$class = 'Modules\\'.$this->moduleName.'\\Console\\'.$file->getFilenameWithoutExtension();
$class = 'Modules\\' . $this->moduleName . '\\Console\\' . $file->getFilenameWithoutExtension();
return $class;
})
@@ -81,10 +81,11 @@ class PricingServiceProvider extends ServiceProvider
protected function registerConfig(): void
{
$this->publishes([
module_path(ModuleInfo::name(), 'Config/config.php') => config_path(ModuleInfo::nameLower().'.php'),
module_path(ModuleInfo::name(), 'Config/config.php') => config_path(ModuleInfo::nameLower() . '.php'),
], 'config');
$this->mergeConfigFrom(
module_path(ModuleInfo::name(), 'Config/config.php'), ModuleInfo::nameLower()
module_path(ModuleInfo::name(), 'Config/config.php'),
ModuleInfo::nameLower(),
);
}
@@ -93,11 +94,11 @@ class PricingServiceProvider extends ServiceProvider
*/
public function registerViews(): void
{
$viewPath = resource_path('views/modules/'.ModuleInfo::nameLower());
$viewPath = resource_path('views/modules/' . ModuleInfo::nameLower());
$sourcePath = module_path(ModuleInfo::name(), 'Resources/views');
$this->publishes([
$sourcePath => $viewPath,
], ['views', ModuleInfo::nameLower().'-module-views']);
], ['views', ModuleInfo::nameLower() . '-module-views']);
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), ModuleInfo::nameLower());
}
@@ -106,7 +107,7 @@ class PricingServiceProvider extends ServiceProvider
*/
public function registerTranslations(): void
{
$langPath = resource_path('lang/modules/'.ModuleInfo::nameLower());
$langPath = resource_path('lang/modules/' . ModuleInfo::nameLower());
if (is_dir($langPath)) {
$this->loadTranslationsFrom($langPath, ModuleInfo::nameLower());
@@ -122,8 +123,8 @@ class PricingServiceProvider extends ServiceProvider
{
$paths = [];
foreach (Config::get('view.paths') as $path) {
if (is_dir($path.'/modules/'.ModuleInfo::nameLower())) {
$paths[] = $path.'/modules/'.ModuleInfo::nameLower();
if (is_dir($path . '/modules/' . ModuleInfo::nameLower())) {
$paths[] = $path . '/modules/' . ModuleInfo::nameLower();
}
}