diff --git a/.gitignore b/.gitignore index 74c1b4b..6d46140 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ .phpunit.result.cache composer.lock .phpunit.cache +/node_modules +/var diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..3723623 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +yarn lint-staged diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 6004c13..95e633b 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -23,13 +23,10 @@ EOF; $finder = PhpCsFixer\Finder::create() - ->in([ - __DIR__ . '/src', - __DIR__ . '/tests', - ]) - ->append([ - __FILE__, - __DIR__ . '/rector.php', + ->in(__DIR__) + ->notPath([ + 'node_modules', + 'var', ]) ; @@ -53,4 +50,5 @@ 'declare_strict_types' => true, ]) ->setRiskyAllowed(true) + ->setCacheFile(__DIR__ . '/var/tools/.php-cs-fixer.cache') ->setFinder($finder); diff --git a/composer.json b/composer.json index 3d1d956..f9f52b7 100644 --- a/composer.json +++ b/composer.json @@ -13,12 +13,17 @@ "require": { "php": ">=8.2" }, + "config": { + "bump-after-update": "dev" + }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.93", - "phpunit/phpunit": "^10.5.26", - "phpstan/phpstan": "^2", - "rector/rector": "^2", - "vimeo/psalm": "^5.26" + "dg/bypass-finals": "^1.9", + "friendsofphp/php-cs-fixer": "^3.93.1", + "phpstan/phpstan": "^2.1.37", + "phpunit/phpunit": "^10.5.26|^11.5.50|^12.0", + "rector/rector": "^2.3.5", + "rector/swiss-knife": "^2.3.5", + "vimeo/psalm": "^5.26|^6.14.3" }, "autoload": { "psr-4": { diff --git a/package.json b/package.json new file mode 100644 index 0000000..7beff95 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "devDependencies": { + "husky": ">=9.1.6", + "lint-staged": ">=15.2.10" + }, + "lint-staged": { + "*.php": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php" + }, + "scripts": { + "prepare": "husky" + } +} diff --git a/phpstan.neon b/phpstan.neon index a4c8812..e371c39 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,13 @@ parameters: level: max + tmpDir: var/tools/phpstan paths: - src - tests + ignoreErrors: + - identifier: method.unresolvableReturnType + path: tests/* + - identifier: method.nonObject + path: tests/* + - identifier: argument.unresolvableType + path: tests/* diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d45b6fd..db9d5ab 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + @@ -15,4 +15,7 @@ ./src + + + diff --git a/rector.php b/rector.php index dce7528..754d205 100644 --- a/rector.php +++ b/rector.php @@ -12,10 +12,11 @@ * with this source code in the file LICENSE. */ +use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector; use Rector\Config\RectorConfig; -use Rector\PHPUnit\Set\PHPUnitSetList; return RectorConfig::configure() + ->withCache(__DIR__ . '/var/tools/rector') ->withImportNames() ->withPaths([ __DIR__ . '/src', @@ -23,6 +24,14 @@ ]) // uncomment to reach your current PHP version ->withPhpSets() - ->withSets([ - PHPUnitSetList::PHPUNIT_100, - ]); + ->withComposerBased( + phpunit: true, + ) + ->withPreparedSets( + deadCode: true, + codeQuality: true + ) + ->withSkip([ + FlipTypeControlToUseExclusiveTypeRector::class, + ]) +; diff --git a/src/Banking/Balance.php b/src/Banking/Balance.php index 6c55dfa..bd0f100 100644 --- a/src/Banking/Balance.php +++ b/src/Banking/Balance.php @@ -16,7 +16,7 @@ use DateTimeImmutable; -class Balance extends Element +final class Balance extends Element { public function __construct( private readonly string $bankCode, diff --git a/src/Banking/Header.php b/src/Banking/Header.php index a61f5bd..1180480 100644 --- a/src/Banking/Header.php +++ b/src/Banking/Header.php @@ -16,7 +16,7 @@ use DateTimeInterface; -class Header extends Element +final class Header extends Element { public function __construct( private readonly int $sequenceNumber, diff --git a/src/Banking/Noop.php b/src/Banking/Noop.php index 9472eef..f512276 100644 --- a/src/Banking/Noop.php +++ b/src/Banking/Noop.php @@ -14,6 +14,6 @@ namespace Silarhi\Cfonb\Banking; -class Noop extends Element +final class Noop extends Element { } diff --git a/src/Banking/Operation.php b/src/Banking/Operation.php index 8b57898..ee92879 100644 --- a/src/Banking/Operation.php +++ b/src/Banking/Operation.php @@ -16,10 +16,10 @@ use DateTimeImmutable; -class Operation extends Element +final class Operation extends Element { /** @var OperationDetail[] */ - private array $details; + private array $details = []; public function __construct( private readonly string $bankCode, @@ -37,7 +37,6 @@ public function __construct( private readonly ?string $exemptCode, private readonly ?string $bankOperationReference, ) { - $this->details = []; } public function getBankCode(): string diff --git a/src/Banking/OperationDetail.php b/src/Banking/OperationDetail.php index f34e978..37b5d51 100644 --- a/src/Banking/OperationDetail.php +++ b/src/Banking/OperationDetail.php @@ -16,7 +16,7 @@ use DateTimeImmutable; -class OperationDetail extends Element +final class OperationDetail extends Element { public function __construct( private readonly string $bankCode, diff --git a/src/Banking/Statement.php b/src/Banking/Statement.php index 2c932b8..11fbf30 100644 --- a/src/Banking/Statement.php +++ b/src/Banking/Statement.php @@ -16,21 +16,14 @@ use Silarhi\Cfonb\Exceptions\BalanceUnavailableException; -class Statement extends Element +final class Statement extends Element { - private ?Balance $oldBalance; + private ?Balance $oldBalance = null; - private ?Balance $newBalance; + private ?Balance $newBalance = null; /** @var Operation[] */ - private array $operations; - - public function __construct() - { - $this->oldBalance = null; - $this->newBalance = null; - $this->operations = []; - } + private array $operations = []; public function addOperation(Operation $operation): self { diff --git a/src/Banking/Total.php b/src/Banking/Total.php index b1d6de9..6d52e54 100644 --- a/src/Banking/Total.php +++ b/src/Banking/Total.php @@ -16,7 +16,7 @@ use DateTimeInterface; -class Total extends Element +final class Total extends Element { public function __construct( private readonly int $sequenceNumber, @@ -31,10 +31,9 @@ public function __construct( private readonly string $recipientCounterCode2, private readonly string $recipientAccountNumber2, private readonly ?string $recipientName2, - private ?string $processingCenterCode, + private readonly ?string $processingCenterCode, private readonly float $totalAmount, ) { - $this->processingCenterCode = $processingCenterCode; } public function getSequenceNumber(): int diff --git a/src/Banking/Transaction.php b/src/Banking/Transaction.php index 925910c..3d8c82a 100644 --- a/src/Banking/Transaction.php +++ b/src/Banking/Transaction.php @@ -16,7 +16,7 @@ use DateTimeInterface; -class Transaction extends Element +final class Transaction extends Element { public function __construct( private readonly int $sequenceNumber, diff --git a/src/Banking/Transfer.php b/src/Banking/Transfer.php index ff37f99..599cfb0 100644 --- a/src/Banking/Transfer.php +++ b/src/Banking/Transfer.php @@ -17,23 +17,16 @@ use Silarhi\Cfonb\Exceptions\HeaderUnavailableException; use Silarhi\Cfonb\Exceptions\TotalUnavailableException; -class Transfer extends Element +final class Transfer extends Element { - private ?Header $header; + private ?Header $header = null; /** * @var Transaction[] */ - private array $transactions; + private array $transactions = []; - private ?Total $total; - - public function __construct() - { - $this->header = null; - $this->total = null; - $this->transactions = []; - } + private ?Total $total = null; public function setHeader(Header $header): void { diff --git a/src/Cfonb120Reader.php b/src/Cfonb120Reader.php index 33adac6..65aa538 100644 --- a/src/Cfonb120Reader.php +++ b/src/Cfonb120Reader.php @@ -28,11 +28,11 @@ use function sprintf; -class Cfonb120Reader +final readonly class Cfonb120Reader { final public const LINE_LENGTH = 120; - private readonly FileParser $fileParser; + private FileParser $fileParser; public function __construct(?FileParser $fileParser = null) { diff --git a/src/Cfonb240Reader.php b/src/Cfonb240Reader.php index cf4cb11..1f93ad9 100644 --- a/src/Cfonb240Reader.php +++ b/src/Cfonb240Reader.php @@ -27,11 +27,11 @@ use function sprintf; -class Cfonb240Reader +final readonly class Cfonb240Reader { final public const LINE_LENGTH = 240; - private readonly FileParser $fileParser; + private FileParser $fileParser; public function __construct(?FileParser $fileParser = null) { diff --git a/src/CfonbCodes.php b/src/CfonbCodes.php index 44ca853..91ddc58 100644 --- a/src/CfonbCodes.php +++ b/src/CfonbCodes.php @@ -14,7 +14,7 @@ namespace Silarhi\Cfonb; -class CfonbCodes +final class CfonbCodes { /** @var string[][] */ public static array $codes = [ diff --git a/src/CfonbReader.php b/src/CfonbReader.php index f4d3960..d35c05a 100644 --- a/src/CfonbReader.php +++ b/src/CfonbReader.php @@ -17,11 +17,11 @@ use Silarhi\Cfonb\Banking\Statement; use Silarhi\Cfonb\Banking\Transfer; -class CfonbReader +final readonly class CfonbReader { public function __construct( - private readonly Cfonb120Reader $cfonb120Reader = new Cfonb120Reader(), - private readonly Cfonb240Reader $cfonb240Reader = new Cfonb240Reader(), + private Cfonb120Reader $cfonb120Reader = new Cfonb120Reader(), + private Cfonb240Reader $cfonb240Reader = new Cfonb240Reader(), ) { } diff --git a/src/Contracts/ParserInterface.php b/src/Contracts/ParserInterface.php index 710401e..786fc9b 100644 --- a/src/Contracts/ParserInterface.php +++ b/src/Contracts/ParserInterface.php @@ -24,7 +24,7 @@ interface ParserInterface public function parse(string $content, bool $strict): Element; /** - * Checks if current line is handled by the parser + * Checks if the parser handles the current line * * @return bool true if the line is handled by the current parser, false otherwise */ diff --git a/src/Parser/Cfonb120/AbstractCfonb120Parser.php b/src/Parser/Cfonb120/AbstractCfonb120Parser.php index fd91719..599718d 100644 --- a/src/Parser/Cfonb120/AbstractCfonb120Parser.php +++ b/src/Parser/Cfonb120/AbstractCfonb120Parser.php @@ -14,6 +14,7 @@ namespace Silarhi\Cfonb\Parser\Cfonb120; +use Override; use Silarhi\Cfonb\Cfonb120Reader; use Silarhi\Cfonb\Contracts\ParserInterface; @@ -27,6 +28,7 @@ abstract protected function getSupportedCode(): string; /** * {@inheritdoc} */ + #[Override] public function supports(string $content): bool { return Cfonb120Reader::LINE_LENGTH === strlen($content) && $this->getSupportedCode() === substr($content, 0, 2); diff --git a/src/Parser/Cfonb120/Line01Parser.php b/src/Parser/Cfonb120/Line01Parser.php index e68141a..30904ed 100644 --- a/src/Parser/Cfonb120/Line01Parser.php +++ b/src/Parser/Cfonb120/Line01Parser.php @@ -14,6 +14,7 @@ namespace Silarhi\Cfonb\Parser\Cfonb120; +use Override; use Silarhi\Cfonb\Banking\Balance; use Silarhi\Cfonb\Parser\AmountParser; use Silarhi\Cfonb\Parser\DateParser; @@ -48,6 +49,7 @@ public function __construct() ]); } + #[Override] public function parse(string $content, bool $strict): Balance { $regexMatch = $this->lineParser->parse($content); @@ -62,6 +64,7 @@ public function parse(string $content, bool $strict): Balance ); } + #[Override] protected function getSupportedCode(): string { return '01'; diff --git a/src/Parser/Cfonb120/Line04Parser.php b/src/Parser/Cfonb120/Line04Parser.php index 9331ff1..25efc03 100644 --- a/src/Parser/Cfonb120/Line04Parser.php +++ b/src/Parser/Cfonb120/Line04Parser.php @@ -14,6 +14,7 @@ namespace Silarhi\Cfonb\Parser\Cfonb120; +use Override; use Silarhi\Cfonb\Banking\Operation; use Silarhi\Cfonb\Parser\AmountParser; use Silarhi\Cfonb\Parser\DateParser; @@ -54,6 +55,7 @@ public function __construct() ]); } + #[Override] public function parse(string $content, bool $strict): Operation { $regexMatch = $this->lineParser->parse($content); @@ -76,6 +78,7 @@ public function parse(string $content, bool $strict): Operation ); } + #[Override] protected function getSupportedCode(): string { return '04'; diff --git a/src/Parser/Cfonb120/Line05Parser.php b/src/Parser/Cfonb120/Line05Parser.php index 82084a2..b94370b 100644 --- a/src/Parser/Cfonb120/Line05Parser.php +++ b/src/Parser/Cfonb120/Line05Parser.php @@ -14,6 +14,7 @@ namespace Silarhi\Cfonb\Parser\Cfonb120; +use Override; use Silarhi\Cfonb\Banking\OperationDetail; use Silarhi\Cfonb\Parser\DateParser; use Silarhi\Cfonb\Parser\LineParser; @@ -46,6 +47,7 @@ public function __construct() ]); } + #[Override] public function parse(string $content, bool $strict): OperationDetail { $regexMatch = $this->lineParser->parse($content); @@ -63,6 +65,7 @@ public function parse(string $content, bool $strict): OperationDetail ); } + #[Override] protected function getSupportedCode(): string { return '05'; diff --git a/src/Parser/Cfonb120/Line07Parser.php b/src/Parser/Cfonb120/Line07Parser.php index 7c2faf6..cab6fba 100644 --- a/src/Parser/Cfonb120/Line07Parser.php +++ b/src/Parser/Cfonb120/Line07Parser.php @@ -14,9 +14,12 @@ namespace Silarhi\Cfonb\Parser\Cfonb120; +use Override; + /** @internal */ final class Line07Parser extends Line01Parser { + #[Override] protected function getSupportedCode(): string { return '07'; diff --git a/src/Parser/Cfonb240/AbstractCfonb240Parser.php b/src/Parser/Cfonb240/AbstractCfonb240Parser.php index 317a032..b962fcd 100644 --- a/src/Parser/Cfonb240/AbstractCfonb240Parser.php +++ b/src/Parser/Cfonb240/AbstractCfonb240Parser.php @@ -14,6 +14,7 @@ namespace Silarhi\Cfonb\Parser\Cfonb240; +use Override; use Silarhi\Cfonb\Cfonb240Reader; use Silarhi\Cfonb\Contracts\ParserInterface; @@ -27,6 +28,7 @@ abstract protected function getSupportedCode(): string; /** * {@inheritdoc} */ + #[Override] public function supports(string $content): bool { return Cfonb240Reader::LINE_LENGTH === strlen($content) && $this->getSupportedCode() === substr($content, 0, 2); diff --git a/src/Parser/Cfonb240/Line31Parser.php b/src/Parser/Cfonb240/Line31Parser.php index 3204519..9659e1f 100644 --- a/src/Parser/Cfonb240/Line31Parser.php +++ b/src/Parser/Cfonb240/Line31Parser.php @@ -14,6 +14,7 @@ namespace Silarhi\Cfonb\Parser\Cfonb240; +use Override; use Silarhi\Cfonb\Banking\Header; use Silarhi\Cfonb\Parser\DateParser; use Silarhi\Cfonb\Parser\LineParser; @@ -50,6 +51,7 @@ public function __construct() ]); } + #[Override] public function parse(string $content, bool $strict): Header { $regexMatch = $this->lineParser->parse($content); @@ -71,6 +73,7 @@ public function parse(string $content, bool $strict): Header ); } + #[Override] protected function getSupportedCode(): string { return '31'; diff --git a/src/Parser/Cfonb240/Line34Parser.php b/src/Parser/Cfonb240/Line34Parser.php index 6dc7ebd..93c52a8 100644 --- a/src/Parser/Cfonb240/Line34Parser.php +++ b/src/Parser/Cfonb240/Line34Parser.php @@ -14,6 +14,7 @@ namespace Silarhi\Cfonb\Parser\Cfonb240; +use Override; use Silarhi\Cfonb\Banking\Transaction; use Silarhi\Cfonb\Parser\DateParser; use Silarhi\Cfonb\Parser\LineParser; @@ -57,6 +58,7 @@ public function __construct() ]); } + #[Override] public function parse(string $content, bool $strict): Transaction { $regexMatch = $this->lineParser->parse($content); @@ -83,6 +85,7 @@ public function parse(string $content, bool $strict): Transaction ); } + #[Override] protected function getSupportedCode(): string { return '34'; diff --git a/src/Parser/Cfonb240/Line39Parser.php b/src/Parser/Cfonb240/Line39Parser.php index bc8418f..38d3d79 100644 --- a/src/Parser/Cfonb240/Line39Parser.php +++ b/src/Parser/Cfonb240/Line39Parser.php @@ -14,6 +14,7 @@ namespace Silarhi\Cfonb\Parser\Cfonb240; +use Override; use Silarhi\Cfonb\Banking\Total; use Silarhi\Cfonb\Parser\DateParser; use Silarhi\Cfonb\Parser\LineParser; @@ -54,6 +55,7 @@ public function __construct() ]); } + #[Override] public function parse(string $content, bool $strict): Total { $regexMatch = $this->lineParser->parse($content); @@ -76,6 +78,7 @@ public function parse(string $content, bool $strict): Total ); } + #[Override] protected function getSupportedCode(): string { return '39'; diff --git a/src/Parser/EmptyParser.php b/src/Parser/EmptyParser.php index d7d1ea3..f28d51f 100644 --- a/src/Parser/EmptyParser.php +++ b/src/Parser/EmptyParser.php @@ -14,19 +14,22 @@ namespace Silarhi\Cfonb\Parser; +use Override; use Silarhi\Cfonb\Banking\Noop; use Silarhi\Cfonb\Contracts\ParserInterface; /** @internal */ final class EmptyParser implements ParserInterface { + #[Override] public function parse(string $content, bool $strict): Noop { return new Noop(); } + #[Override] public function supports(string $content): bool { - return empty($content); + return '' === $content; } } diff --git a/src/Parser/FileParser.php b/src/Parser/FileParser.php index 70aabc5..b02aaaf 100644 --- a/src/Parser/FileParser.php +++ b/src/Parser/FileParser.php @@ -42,7 +42,7 @@ public function parse(string $content, int $lineLength, bool $strict): iterable { $content = ltrim(rtrim(str_replace("\r\n", "\n", $content), "\n"), "\n"); - if (empty($content)) { + if ('' === $content) { return []; } diff --git a/src/Parser/MoneyParser.php b/src/Parser/MoneyParser.php index e7bcddd..27bf286 100644 --- a/src/Parser/MoneyParser.php +++ b/src/Parser/MoneyParser.php @@ -19,6 +19,6 @@ final class MoneyParser { public function parser(float $money): float { - return $money / 100; + return $money / 100.0; } } diff --git a/src/Parser/RegexMatch.php b/src/Parser/RegexMatch.php index bb62c15..2f7c508 100644 --- a/src/Parser/RegexMatch.php +++ b/src/Parser/RegexMatch.php @@ -24,10 +24,10 @@ use function strlen; /** @internal */ -class RegexMatch +final readonly class RegexMatch { /** @var array */ - private readonly array $values; + private array $values; /** * @param array $regexParts @@ -51,7 +51,7 @@ public function __construct( } $value = trim($matches[$index]); - $values[$key] = 0 != strlen($value) ? $value : null; + $values[$key] = 0 !== strlen($value) ? $value : null; } $this->values = $values; diff --git a/src/Parser/RegexParts.php b/src/Parser/RegexParts.php index d4b72bf..d0db059 100644 --- a/src/Parser/RegexParts.php +++ b/src/Parser/RegexParts.php @@ -17,12 +17,12 @@ use function sprintf; /** @internal */ -class RegexParts +final readonly class RegexParts { public function __construct( - private readonly string $regexParts, - private readonly ?int $length = null, - private readonly bool $matching = true, + private string $regexParts, + private ?int $length = null, + private bool $matching = true, ) { } diff --git a/tests/Banking/HeaderTest.php b/tests/Banking/HeaderTest.php index e60a11b..9d118ee 100644 --- a/tests/Banking/HeaderTest.php +++ b/tests/Banking/HeaderTest.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase; use Silarhi\Cfonb\Banking\Header; -class HeaderTest extends TestCase +final class HeaderTest extends TestCase { /** @return void */ public function testGetter() diff --git a/tests/Banking/OperationDetailTest.php b/tests/Banking/OperationDetailTest.php index 1a0764f..6d39e0e 100644 --- a/tests/Banking/OperationDetailTest.php +++ b/tests/Banking/OperationDetailTest.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase; use Silarhi\Cfonb\Banking\OperationDetail; -class OperationDetailTest extends TestCase +final class OperationDetailTest extends TestCase { /** @return void */ public function testGetter() diff --git a/tests/Banking/OperationTest.php b/tests/Banking/OperationTest.php index 07f1ee4..1b2af12 100644 --- a/tests/Banking/OperationTest.php +++ b/tests/Banking/OperationTest.php @@ -19,7 +19,7 @@ use Silarhi\Cfonb\Banking\Operation; use Silarhi\Cfonb\Banking\OperationDetail; -class OperationTest extends TestCase +final class OperationTest extends TestCase { /** @return void */ public function testGetter() diff --git a/tests/Banking/StatementTest.php b/tests/Banking/StatementTest.php index ef82141..954ae50 100644 --- a/tests/Banking/StatementTest.php +++ b/tests/Banking/StatementTest.php @@ -19,7 +19,7 @@ use Silarhi\Cfonb\Banking\Statement; use Silarhi\Cfonb\Exceptions\BalanceUnavailableException; -class StatementTest extends TestCase +final class StatementTest extends TestCase { /** @return void */ public function testGetter() diff --git a/tests/Banking/TotalTest.php b/tests/Banking/TotalTest.php index 8dd36f8..368d7be 100644 --- a/tests/Banking/TotalTest.php +++ b/tests/Banking/TotalTest.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase; use Silarhi\Cfonb\Banking\Total; -class TotalTest extends TestCase +final class TotalTest extends TestCase { /** @return void */ public function testGetter() diff --git a/tests/Banking/TransactionTest.php b/tests/Banking/TransactionTest.php index 18593c4..fc345e1 100644 --- a/tests/Banking/TransactionTest.php +++ b/tests/Banking/TransactionTest.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase; use Silarhi\Cfonb\Banking\Transaction; -class TransactionTest extends TestCase +final class TransactionTest extends TestCase { /** @return void */ public function testGetter() diff --git a/tests/Banking/TransferTest.php b/tests/Banking/TransferTest.php index 857aff4..8140840 100644 --- a/tests/Banking/TransferTest.php +++ b/tests/Banking/TransferTest.php @@ -22,7 +22,7 @@ use Silarhi\Cfonb\Exceptions\HeaderUnavailableException; use Silarhi\Cfonb\Exceptions\TotalUnavailableException; -class TransferTest extends TestCase +final class TransferTest extends TestCase { /** @return void */ public function testFailOnHeaderNoAvailable() diff --git a/tests/Cfonb120ReaderTest.php b/tests/Cfonb120ReaderTest.php index 9e8a02e..f557c2a 100644 --- a/tests/Cfonb120ReaderTest.php +++ b/tests/Cfonb120ReaderTest.php @@ -21,7 +21,7 @@ use function sprintf; -class Cfonb120ReaderTest extends CfonbTestCase +final class Cfonb120ReaderTest extends CfonbTestCase { public function testEmpty(): void { diff --git a/tests/Cfonb240ReaderTest.php b/tests/Cfonb240ReaderTest.php index 9894f15..2b8b30f 100644 --- a/tests/Cfonb240ReaderTest.php +++ b/tests/Cfonb240ReaderTest.php @@ -18,7 +18,7 @@ use Silarhi\Cfonb\Cfonb240Reader; use Silarhi\Cfonb\Exceptions\ParseException; -class Cfonb240ReaderTest extends CfonbTestCase +final class Cfonb240ReaderTest extends CfonbTestCase { public function testEmpty(): void { @@ -52,6 +52,8 @@ public function testComplexTest(): void $transfers = (new Cfonb240Reader())->parse($this->loadFixture('cfonb.240-complex-test.txt', false)); self::assertCount(2, $transfers); + + // @phpstan-ignore staticMethod.alreadyNarrowedType self::assertContainsOnlyInstancesOf(Transfer::class, $transfers); $firstTransfers = $transfers[0]; diff --git a/tests/CfonbReaderTest.php b/tests/CfonbReaderTest.php index 850ac1a..fa3c9d0 100644 --- a/tests/CfonbReaderTest.php +++ b/tests/CfonbReaderTest.php @@ -21,7 +21,7 @@ use Silarhi\Cfonb\CfonbReader; #[CoversClass(CfonbReader::class)] -class CfonbReaderTest extends TestCase +final class CfonbReaderTest extends TestCase { public function testOk(): void { diff --git a/tests/CfonbTestCase.php b/tests/CfonbTestCase.php index e18f127..a8e5216 100644 --- a/tests/CfonbTestCase.php +++ b/tests/CfonbTestCase.php @@ -29,7 +29,7 @@ public static function loadFixture(string $file, bool $oneline): string throw new RuntimeException(sprintf('unable to get %s', $file)); } - if (true === $oneline) { + if ($oneline) { $result = str_replace("\n", '', $result); } diff --git a/tests/Parser/AmountParserTest.php b/tests/Parser/AmountParserTest.php index 5d8bc99..785ed2b 100644 --- a/tests/Parser/AmountParserTest.php +++ b/tests/Parser/AmountParserTest.php @@ -20,7 +20,7 @@ use Silarhi\Cfonb\Exceptions\ParseException; use Silarhi\Cfonb\Parser\AmountParser; -class AmountParserTest extends TestCase +final class AmountParserTest extends TestCase { public function testFail(): void { diff --git a/tests/Parser/Cfonb120/Line01ParserTest.php b/tests/Parser/Cfonb120/Line01ParserTest.php index c7803b2..74c8127 100644 --- a/tests/Parser/Cfonb120/Line01ParserTest.php +++ b/tests/Parser/Cfonb120/Line01ParserTest.php @@ -18,7 +18,7 @@ use Silarhi\Cfonb\Banking\Balance; use Silarhi\Cfonb\Parser\Cfonb120\Line01Parser; -class Line01ParserTest extends TestCase +final class Line01ParserTest extends TestCase { private function parse(string $content): Balance { diff --git a/tests/Parser/Cfonb240/Line34ParserTest.php b/tests/Parser/Cfonb240/Line34ParserTest.php index 737a282..ef1b266 100644 --- a/tests/Parser/Cfonb240/Line34ParserTest.php +++ b/tests/Parser/Cfonb240/Line34ParserTest.php @@ -18,7 +18,7 @@ use Silarhi\Cfonb\Banking\Transaction; use Silarhi\Cfonb\Parser\Cfonb240\Line34Parser; -class Line34ParserTest extends TestCase +final class Line34ParserTest extends TestCase { private function parse(string $content): Transaction { diff --git a/tests/Parser/DateParserTest.php b/tests/Parser/DateParserTest.php index 234ae47..e582b25 100644 --- a/tests/Parser/DateParserTest.php +++ b/tests/Parser/DateParserTest.php @@ -20,7 +20,7 @@ use Silarhi\Cfonb\Exceptions\ParseException; use Silarhi\Cfonb\Parser\DateParser; -class DateParserTest extends TestCase +final class DateParserTest extends TestCase { public function testFail(): void { diff --git a/tests/Parser/FileParserTest.php b/tests/Parser/FileParserTest.php index db66341..9869abb 100644 --- a/tests/Parser/FileParserTest.php +++ b/tests/Parser/FileParserTest.php @@ -21,7 +21,7 @@ use Silarhi\Cfonb\Contracts\ParserInterface; use Silarhi\Cfonb\Parser\FileParser; -class FileParserTest extends TestCase +final class FileParserTest extends TestCase { /** @return iterable> */ public static function provideEmptyCase(): iterable @@ -235,7 +235,7 @@ public function testSplitOk( $invokedCountSupportInternal = self::exactly($invokedCountSupport); $parser->expects($invokedCountSupportInternal) ->method('supports') - ->willReturnCallback(function (mixed ...$args) use ($invokedCountSupportInternal, $supportArgs, $supportReturnValue): mixed { + ->willReturnCallback(static function (mixed ...$args) use ($invokedCountSupportInternal, $supportArgs, $supportReturnValue): mixed { self::assertSame($supportArgs[$invokedCountSupportInternal->numberOfInvocations()], $args); return $supportReturnValue[$invokedCountSupportInternal->numberOfInvocations()]; @@ -245,7 +245,7 @@ public function testSplitOk( $invokedCountParseInternal = self::exactly($invokedCountParse); $parser->expects($invokedCountParseInternal) ->method('parse') - ->willReturnCallback(function (mixed ...$args) use ($invokedCountParseInternal, $parseArgs, $parseReturnValue, $strict): mixed { + ->willReturnCallback(static function (mixed ...$args) use ($invokedCountParseInternal, $parseArgs, $parseReturnValue, $strict): mixed { self::assertSame([$parseArgs[$invokedCountParseInternal->numberOfInvocations()], $strict], $args); return $parseReturnValue[$invokedCountParseInternal->numberOfInvocations()]; diff --git a/tests/Parser/MoneyParserTest.php b/tests/Parser/MoneyParserTest.php index dcb84cb..4f8cab0 100644 --- a/tests/Parser/MoneyParserTest.php +++ b/tests/Parser/MoneyParserTest.php @@ -19,7 +19,7 @@ use PHPUnit\Framework\TestCase; use Silarhi\Cfonb\Parser\MoneyParser; -class MoneyParserTest extends TestCase +final class MoneyParserTest extends TestCase { /** @return Generator> */ public static function provideOkCase(): iterable diff --git a/tests/Parser/RegexMatchTest.php b/tests/Parser/RegexMatchTest.php index 1302f58..f3e9191 100644 --- a/tests/Parser/RegexMatchTest.php +++ b/tests/Parser/RegexMatchTest.php @@ -21,7 +21,7 @@ use Silarhi\Cfonb\Parser\RegexMatch; use Silarhi\Cfonb\Parser\RegexParts; -class RegexMatchTest extends TestCase +final class RegexMatchTest extends TestCase { public function testKeyDoesNotExistOnGetStringOrNull(): void { diff --git a/tests/Parser/RegexPartsTest.php b/tests/Parser/RegexPartsTest.php index c2c8b48..da1339f 100644 --- a/tests/Parser/RegexPartsTest.php +++ b/tests/Parser/RegexPartsTest.php @@ -19,7 +19,7 @@ use PHPUnit\Framework\TestCase; use Silarhi\Cfonb\Parser\RegexParts; -class RegexPartsTest extends TestCase +final class RegexPartsTest extends TestCase { /** @return Generator> */ public static function provideOkCase(): iterable diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..3d46302 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,243 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +ansi-escapes@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-7.2.0.tgz#31b25afa3edd3efc09d98c2fee831d460ff06b49" + integrity sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw== + dependencies: + environment "^1.0.0" + +ansi-regex@^6.0.1: + version "6.2.2" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1" + integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg== + +ansi-styles@^6.2.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041" + integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg== + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +cli-cursor@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-5.0.0.tgz#24a4831ecf5a6b01ddeb32fb71a4b2088b0dce38" + integrity sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw== + dependencies: + restore-cursor "^5.0.0" + +cli-truncate@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-5.1.1.tgz#455476face9904d94b7d11e98d9adbca15292ea5" + integrity sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A== + dependencies: + slice-ansi "^7.1.0" + string-width "^8.0.0" + +colorette@^2.0.20: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-14.0.2.tgz#b71fd37fe4069e4c3c7c13925252ada4eba14e8e" + integrity sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ== + +emoji-regex@^10.3.0: + version "10.6.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.6.0.tgz#bf3d6e8f7f8fd22a65d9703475bc0147357a6b0d" + integrity sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A== + +environment@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/environment/-/environment-1.1.0.tgz#8e86c66b180f363c7ab311787e0259665f45a9f1" + integrity sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q== + +eventemitter3@^5.0.1: + version "5.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.4.tgz#a86d66170433712dde814707ac52b5271ceb1feb" + integrity sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw== + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +get-east-asian-width@^1.0.0, get-east-asian-width@^1.3.0, get-east-asian-width@^1.3.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz#9bc4caa131702b4b61729cb7e42735bc550c9ee6" + integrity sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q== + +husky@>=9.1.6: + version "9.1.7" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d" + integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA== + +is-fullwidth-code-point@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz#046b2a6d4f6b156b2233d3207d4b5a9783999b98" + integrity sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ== + dependencies: + get-east-asian-width "^1.3.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +lint-staged@>=15.2.10: + version "16.2.7" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-16.2.7.tgz#c4a635960c17b52fe774f1f40aee8ce1bd86531f" + integrity sha512-lDIj4RnYmK7/kXMya+qJsmkRFkGolciXjrsZ6PC25GdTfWOAWetR0ZbsNXRAj1EHHImRSalc+whZFg56F5DVow== + dependencies: + commander "^14.0.2" + listr2 "^9.0.5" + micromatch "^4.0.8" + nano-spawn "^2.0.0" + pidtree "^0.6.0" + string-argv "^0.3.2" + yaml "^2.8.1" + +listr2@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-9.0.5.tgz#92df7c4416a6da630eb9ef46da469b70de97b316" + integrity sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g== + dependencies: + cli-truncate "^5.0.0" + colorette "^2.0.20" + eventemitter3 "^5.0.1" + log-update "^6.1.0" + rfdc "^1.4.1" + wrap-ansi "^9.0.0" + +log-update@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-6.1.0.tgz#1a04ff38166f94647ae1af562f4bd6a15b1b7cd4" + integrity sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w== + dependencies: + ansi-escapes "^7.0.0" + cli-cursor "^5.0.0" + slice-ansi "^7.1.0" + strip-ansi "^7.1.0" + wrap-ansi "^9.0.0" + +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mimic-function@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mimic-function/-/mimic-function-5.0.1.tgz#acbe2b3349f99b9deaca7fb70e48b83e94e67076" + integrity sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA== + +nano-spawn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/nano-spawn/-/nano-spawn-2.0.0.tgz#f1250434c09ae18870d4f729fc54b406cf85a3e1" + integrity sha512-tacvGzUY5o2D8CBh2rrwxyNojUsZNU2zjNTzKQrkgGJQTbGAfArVWXSKMBokBeeg6C7OLRGUEyoFlYbfeWQIqw== + +onetime@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-7.0.0.tgz#9f16c92d8c9ef5120e3acd9dd9957cceecc1ab60" + integrity sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ== + dependencies: + mimic-function "^5.0.0" + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pidtree@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" + integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== + +restore-cursor@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-5.1.0.tgz#0766d95699efacb14150993f55baf0953ea1ebe7" + integrity sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA== + dependencies: + onetime "^7.0.0" + signal-exit "^4.1.0" + +rfdc@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" + integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== + +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +slice-ansi@^7.1.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-7.1.2.tgz#adf7be70aa6d72162d907cd0e6d5c11f507b5403" + integrity sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w== + dependencies: + ansi-styles "^6.2.1" + is-fullwidth-code-point "^5.0.0" + +string-argv@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + +string-width@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.2.0.tgz#b5bb8e2165ce275d4d43476dd2700ad9091db6dc" + integrity sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + +string-width@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-8.1.0.tgz#9e9fb305174947cf45c30529414b5da916e9e8d1" + integrity sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg== + dependencies: + get-east-asian-width "^1.3.0" + strip-ansi "^7.1.0" + +strip-ansi@^7.1.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.2.tgz#132875abde678c7ea8d691533f2e7e22bb744dba" + integrity sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA== + dependencies: + ansi-regex "^6.0.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +wrap-ansi@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-9.0.2.tgz#956832dea9494306e6d209eb871643bb873d7c98" + integrity sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww== + dependencies: + ansi-styles "^6.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + +yaml@^2.8.1: + version "2.8.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.2.tgz#5694f25eca0ce9c3e7a9d9e00ce0ddabbd9e35c5" + integrity sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==