diff --git a/Makefile b/Makefile index 45c50e0..4bd9382 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ fix: ## run fix tools check: ## run analysis tools make phpcs - make pslam + make psalm make phpstan infection: diff --git a/src/Context.php b/src/Context.php index 956f389..5a5bd38 100644 --- a/src/Context.php +++ b/src/Context.php @@ -25,6 +25,9 @@ public function __construct( assert($this->version >= 0); } + /** + * @return non-empty-string + */ public function getName(): string { return $this->dbName . '/' . $this->filename; diff --git a/src/event/EventInterface.php b/src/event/EventInterface.php index a57d0b9..95394f6 100644 --- a/src/event/EventInterface.php +++ b/src/event/EventInterface.php @@ -6,7 +6,13 @@ interface EventInterface { + /** + * @return non-empty-string + */ public function getName(): string; + /** + * @return non-empty-string + */ public function getMessage(): string; } diff --git a/src/event/ExceptionEvent.php b/src/event/ExceptionEvent.php index f556397..1713e34 100644 --- a/src/event/ExceptionEvent.php +++ b/src/event/ExceptionEvent.php @@ -9,6 +9,9 @@ final readonly class ExceptionEvent implements EventInterface { + /** + * @param non-empty-string $dbName + */ public function __construct( public string $dbName, public Throwable $exception, @@ -24,6 +27,9 @@ public function getName(): string #[Override] public function getMessage(): string { + /** + * @var non-empty-string + */ return $this->exception->getMessage(); } } diff --git a/src/internal/filesystem/Action.php b/src/internal/filesystem/Action.php index 70b0d57..a30a908 100644 --- a/src/internal/filesystem/Action.php +++ b/src/internal/filesystem/Action.php @@ -10,7 +10,7 @@ use dbschemix\core\exception\ConfigurationException; /** - * @psalm-internal dbschemix\core + * @psalm-internal dbschemix\core\internal */ final readonly class Action { diff --git a/src/internal/filesystem/Options.php b/src/internal/filesystem/Options.php index 79959b2..fd90968 100644 --- a/src/internal/filesystem/Options.php +++ b/src/internal/filesystem/Options.php @@ -7,7 +7,7 @@ use dbschemix\core\InputOptions; /** - * @psalm-internal dbschemix\core + * @psalm-internal dbschemix\core\internal */ final readonly class Options { diff --git a/src/internal/filesystem/Setup.php b/src/internal/filesystem/Setup.php index 0db4901..161ad2c 100644 --- a/src/internal/filesystem/Setup.php +++ b/src/internal/filesystem/Setup.php @@ -10,7 +10,7 @@ use dbschemix\core\exception\ConfigurationException; /** - * @psalm-internal dbschemix\core + * @psalm-internal dbschemix\core\internal */ final readonly class Setup {