diff --git a/src/ErrorInformationRenderer.php b/src/ErrorInformationRenderer.php index e0fab0b..f7221fd 100644 --- a/src/ErrorInformationRenderer.php +++ b/src/ErrorInformationRenderer.php @@ -5,9 +5,9 @@ namespace Phplrt\Exception; use Phplrt\Contracts\Lexer\TokenInterface; -use Phplrt\Contracts\Position\PositionInterface; use Phplrt\Contracts\Source\ReadableInterface; use Phplrt\Position\Position; +use Phplrt\Contracts\Position\PositionInterface; class ErrorInformationRenderer { diff --git a/src/LineReader.php b/src/LineReader.php index 5e73f7a..6318b4e 100644 --- a/src/LineReader.php +++ b/src/LineReader.php @@ -31,7 +31,6 @@ public function readLine(int $line): string /** * @param int<1, max> $from * @param int<1, max> $to - * * @return iterable, string> */ public function readLines(int $from, int $to): iterable diff --git a/src/RuntimeException.php b/src/RuntimeException.php index f22d7a8..eb7819d 100644 --- a/src/RuntimeException.php +++ b/src/RuntimeException.php @@ -6,10 +6,10 @@ use Phplrt\Contracts\Exception\RuntimeExceptionInterface; use Phplrt\Contracts\Lexer\TokenInterface; -use Phplrt\Contracts\Position\PositionInterface; use Phplrt\Contracts\Source\FileInterface; use Phplrt\Contracts\Source\ReadableInterface; use Phplrt\Position\Position; +use Phplrt\Contracts\Position\PositionInterface; use Phplrt\Source\File; abstract class RuntimeException extends \RuntimeException implements RuntimeExceptionInterface @@ -20,7 +20,10 @@ abstract class RuntimeException extends \RuntimeException implements RuntimeExce private string $original; - public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null) + /** + * @param \Throwable|null $previous + */ + public function __construct(string $message = '', int $code = 0, \Throwable $previous = null) { $this->original = $message; diff --git a/tests/Unit/LineReaderTest.php b/tests/Unit/LineReaderTest.php index f0d1d19..b6d3d09 100644 --- a/tests/Unit/LineReaderTest.php +++ b/tests/Unit/LineReaderTest.php @@ -20,7 +20,7 @@ public static function dataProvider(): array } return [ - '\n' => [self::create($lines, "\n"), self::MAX_LINES_PER_TEST], + '\n' => [self::create($lines, "\n"), self::MAX_LINES_PER_TEST], '\r\n' => [self::create($lines, "\r\n"), self::MAX_LINES_PER_TEST], ]; }