refactor(MoneyServiceProvider, ViewServiceProvider): streamline boot methods

Removed unnecessary conditionals and improved method calls for clarity.
This commit is contained in:
Jérémy Munsch 2026-10-29 20:13:15 +01:00
parent e857a58d00
commit da0c3afc14
No known key found for this signature in database
GPG key ID: 2AAECDA6B7330F91
2 changed files with 3 additions and 4 deletions

View file

@ -66,9 +66,7 @@ class MoneyServiceProvider extends ServiceProvider
*/
public function boot()
{
if (! $this->app->runningInConsole()) {
$this->sharetoView();
}
$this->sharetoView();
}
private function sharetoView(): void

View file

@ -22,12 +22,13 @@ class ViewServiceProvider extends ServiceProvider
*/
public function boot(EloquentProductRepository $productRepository)
{
$this->setUpBladeMacros($productRepository);
if ($this->app->runningInConsole() && ! $this->app->runningUnitTests()) {
return;
}
$this->setupPaginator();
$this->setUpBladeMacros($productRepository);
}
private function setupPaginator(): void