diff --git a/composer.json b/composer.json index 9ba4231..da4edd9 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ }, "require-dev": { "phpunit/phpunit": "~10.2", - "vimeo/psalm": "~5.12", + "innmind/static-analysis": "~1.2.1", "innmind/black-box": "~5.5", "innmind/coding-standard": "~2.0" } diff --git a/src/CallFrame/FunctionCall.php b/src/CallFrame/FunctionCall.php index 97420b3..e72914a 100644 --- a/src/CallFrame/FunctionCall.php +++ b/src/CallFrame/FunctionCall.php @@ -53,21 +53,25 @@ public function functionName(): FunctionName return $this->functionName; } + #[\Override] public function file(): Url { return $this->file; } + #[\Override] public function line(): Line { return $this->line; } + #[\Override] public function arguments(): Sequence { return $this->arguments; } + #[\Override] public function toString(): string { return "{$this->functionName->toString()}()"; diff --git a/src/CallFrame/InternalFunctionCall.php b/src/CallFrame/InternalFunctionCall.php index d9bcef1..3362457 100644 --- a/src/CallFrame/InternalFunctionCall.php +++ b/src/CallFrame/InternalFunctionCall.php @@ -41,11 +41,13 @@ public function functionName(): FunctionName return $this->functionName; } + #[\Override] public function arguments(): Sequence { return $this->arguments; } + #[\Override] public function toString(): string { return "{$this->functionName->toString()}()"; diff --git a/src/CallFrame/InternalMethodCall.php b/src/CallFrame/InternalMethodCall.php index 1d6fc73..b7d0379 100644 --- a/src/CallFrame/InternalMethodCall.php +++ b/src/CallFrame/InternalMethodCall.php @@ -55,11 +55,13 @@ public function method(): Method return $this->method; } + #[\Override] public function arguments(): Sequence { return $this->arguments; } + #[\Override] public function toString(): string { return "{$this->class->toString()}->{$this->method->toString()}()"; diff --git a/src/CallFrame/InternalStaticMethodCall.php b/src/CallFrame/InternalStaticMethodCall.php index 9a095b7..a1c3f8c 100644 --- a/src/CallFrame/InternalStaticMethodCall.php +++ b/src/CallFrame/InternalStaticMethodCall.php @@ -55,11 +55,13 @@ public function method(): Method return $this->method; } + #[\Override] public function arguments(): Sequence { return $this->arguments; } + #[\Override] public function toString(): string { return "{$this->class->toString()}::{$this->method->toString()}()"; diff --git a/src/CallFrame/MethodCall.php b/src/CallFrame/MethodCall.php index 43e4924..d58052b 100644 --- a/src/CallFrame/MethodCall.php +++ b/src/CallFrame/MethodCall.php @@ -63,21 +63,25 @@ public function method(): Method return $this->method; } + #[\Override] public function file(): Url { return $this->file; } + #[\Override] public function line(): Line { return $this->line; } + #[\Override] public function arguments(): Sequence { return $this->arguments; } + #[\Override] public function toString(): string { return "{$this->class->toString()}->{$this->method->toString()}()"; diff --git a/src/CallFrame/StaticMethodCall.php b/src/CallFrame/StaticMethodCall.php index 54b3ab0..a591cf6 100644 --- a/src/CallFrame/StaticMethodCall.php +++ b/src/CallFrame/StaticMethodCall.php @@ -63,21 +63,25 @@ public function method(): Method return $this->method; } + #[\Override] public function file(): Url { return $this->file; } + #[\Override] public function line(): Line { return $this->line; } + #[\Override] public function arguments(): Sequence { return $this->arguments; } + #[\Override] public function toString(): string { return "{$this->class->toString()}::{$this->method->toString()}()"; diff --git a/src/Exception/DomainException.php b/src/Exception/DomainException.php index 9e28b7a..4e7d9ec 100644 --- a/src/Exception/DomainException.php +++ b/src/Exception/DomainException.php @@ -3,6 +3,6 @@ namespace Innmind\StackTrace\Exception; -class DomainException extends \DomainException implements Exception +final class DomainException extends \DomainException implements Exception { } diff --git a/src/FormatPath/FullPath.php b/src/FormatPath/FullPath.php index 7af760d..17644df 100644 --- a/src/FormatPath/FullPath.php +++ b/src/FormatPath/FullPath.php @@ -14,6 +14,7 @@ */ final class FullPath implements FormatPath { + #[\Override] public function __invoke(Url $url, Line $line): string { return "{$url->path()->toString()}:{$line->toString()}"; diff --git a/src/FormatPath/Truncate.php b/src/FormatPath/Truncate.php index 3541317..3effa7b 100644 --- a/src/FormatPath/Truncate.php +++ b/src/FormatPath/Truncate.php @@ -22,6 +22,7 @@ private function __construct(Url $workingDirectory) $this->workingDirectory = $workingDirectory; } + #[\Override] public function __invoke(Url $url, Line $line): string { $workingDirectory = Str::of($this->workingDirectory->path()->toString()); diff --git a/src/Link/SublimeHandler.php b/src/Link/SublimeHandler.php index 2e694b0..eaeab46 100644 --- a/src/Link/SublimeHandler.php +++ b/src/Link/SublimeHandler.php @@ -21,6 +21,7 @@ */ final class SublimeHandler implements Link { + #[\Override] public function __invoke(Url $file, Line $line): Url { return $file->withScheme(Scheme::of('sublime')); diff --git a/src/Link/ToFile.php b/src/Link/ToFile.php index 295ab34..8114c96 100644 --- a/src/Link/ToFile.php +++ b/src/Link/ToFile.php @@ -14,6 +14,7 @@ */ final class ToFile implements Link { + #[\Override] public function __invoke(Url $file, Line $line): Url { return $file;