-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Patchlevel\EventSourcing\CommandBus\Handler; | ||
|
||
use RuntimeException; | ||
|
||
final class ServiceNotResolvable extends RuntimeException | ||
{ | ||
public static function missingType(string $class, $propertyName): self | ||
Check failure on line 9 in src/CommandBus/Handler/ServiceNotResolvable.php GitHub Actions / Static Analysis by Psalm (locked, 8.3, ubuntu-latest)MissingParamType
Check failure on line 9 in src/CommandBus/Handler/ServiceNotResolvable.php GitHub Actions / Static Analysis by PHPStan (locked, 8.3, ubuntu-latest)
|
||
{ | ||
return new self(sprintf('Missing type for property "%s" in class "%s"', $propertyName, $class)); | ||
Check failure on line 11 in src/CommandBus/Handler/ServiceNotResolvable.php GitHub Actions / Static Analysis by Psalm (locked, 8.3, ubuntu-latest)MixedArgument
|
||
} | ||
|
||
public static function typeNotObject(string $class, $propertyName): self | ||
Check failure on line 14 in src/CommandBus/Handler/ServiceNotResolvable.php GitHub Actions / Static Analysis by Psalm (locked, 8.3, ubuntu-latest)MissingParamType
Check failure on line 14 in src/CommandBus/Handler/ServiceNotResolvable.php GitHub Actions / Static Analysis by PHPStan (locked, 8.3, ubuntu-latest)
|
||
{ | ||
return new self(sprintf('Type for property "%s" in class "%s" must be object', $propertyName, $class)); | ||
Check failure on line 16 in src/CommandBus/Handler/ServiceNotResolvable.php GitHub Actions / Static Analysis by Psalm (locked, 8.3, ubuntu-latest)MixedArgument
|
||
} | ||
|
||
public static function missingContainer(): self | ||
{ | ||
return new self('Container is not configured'); | ||
} | ||
} |