Skip to content

Commit

Permalink
Resolve phpstan issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Mar 2, 2025
1 parent 64eb636 commit b310e18
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 99 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"php": "^8.2|^8.3|^8.4",
"illuminate/contracts": "^11.43|^12.0",
"laravel/pint": "^1.21",
"laravel/prompts": "^0.1.16|^0.2|^0.3.1",
"laravel/prompts": "^0.3.1",
"lorisleiva/lody": "^0.6",
"spatie/laravel-package-tools": "^1.19.0",
"symfony/var-exporter": "^6|^7.1"
Expand All @@ -33,8 +33,8 @@
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-laravel": "^3.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
"phpstan/phpstan-phpunit": "^1.0|^2.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"spatie/laravel-data": "^4.11.1",
"lorisleiva/laravel-actions": "^2.9.0"
},
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ parameters:
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false

7 changes: 7 additions & 0 deletions src/Commands/Concerns/HandleHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@ protected function afterHandle()
//
}

/**
* Handle the command, with before and after hooks.
*
* @return bool|null
*/
public function handle()
{
$this->beforeHandle();

parent::handle();

$this->afterHandle();

return true;
}
}
54 changes: 0 additions & 54 deletions src/Commands/Concerns/UpdatesComposer.php

This file was deleted.

3 changes: 1 addition & 2 deletions src/Commands/ConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ protected function layers()

public static function hasRequiredVersionOfLaravelPrompts(): bool
{
return function_exists('\Laravel\Prompts\form')
&& method_exists(\Laravel\Prompts\FormBuilder::class, 'addIf');
return function_exists('\Laravel\Prompts\form');
}

protected function wizard(): int
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/DomainViewModelMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function handle()
]);
}

parent::handle();
return parent::handle();
}

protected function shouldCreateBaseViewModel(): bool
Expand Down
13 changes: 5 additions & 8 deletions src/LaravelDDDServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ public function configurePackage(Package $package): void
Commands\DomainChannelMakeCommand::class,
Commands\DomainConsoleMakeCommand::class,
Commands\DomainControllerMakeCommand::class,
Commands\DomainClassMakeCommand::class,
Commands\DomainEnumMakeCommand::class,
Commands\DomainEventMakeCommand::class,
Commands\DomainExceptionMakeCommand::class,
Commands\DomainInterfaceMakeCommand::class,
Commands\DomainJobMakeCommand::class,
Commands\DomainListenerMakeCommand::class,
Commands\DomainMailMakeCommand::class,
Expand All @@ -57,16 +60,10 @@ public function configurePackage(Package $package): void
Commands\DomainRuleMakeCommand::class,
Commands\DomainScopeMakeCommand::class,
Commands\DomainSeederMakeCommand::class,
Commands\DomainTraitMakeCommand::class,
Commands\Migration\DomainMigrateMakeCommand::class,
]);

if ($this->laravelVersion(11)) {
$package->hasCommand(Commands\DomainClassMakeCommand::class);
$package->hasCommand(Commands\DomainEnumMakeCommand::class);
$package->hasCommand(Commands\DomainInterfaceMakeCommand::class);
$package->hasCommand(Commands\DomainTraitMakeCommand::class);
}

if ($this->app->runningUnitTests()) {
$package->hasRoutes(['testing']);
}
Expand Down Expand Up @@ -135,7 +132,7 @@ public function packageBooted()
{
Autoload::run();

if ($this->app->runningInConsole() && method_exists($this, 'optimizes')) {
if ($this->app->runningInConsole()) {
$this->optimizes(
optimize: 'ddd:optimize',
clear: 'ddd:clear',
Expand Down
30 changes: 0 additions & 30 deletions src/Support/Concerns/InteractsWithComposer.php

This file was deleted.

0 comments on commit b310e18

Please sign in to comment.