From 060630c5b22e2a60d8f9c3662c9276a32b1feb21 Mon Sep 17 00:00:00 2001 From: James Read Date: Sun, 30 Nov 2025 14:48:55 +0000 Subject: [PATCH] fix: typo ignore fixing typo with the rector rule where the Rules ignore aren't being correctly properly. fixes #20 --- src/Rector/JwtAuthUpgradeRector.php | 2 +- .../Rector/JwtAuthUpgradeRector/Fixture/path_and_ignore.php.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Rector/JwtAuthUpgradeRector.php b/src/Rector/JwtAuthUpgradeRector.php index 4bae9e8..f773017 100644 --- a/src/Rector/JwtAuthUpgradeRector.php +++ b/src/Rector/JwtAuthUpgradeRector.php @@ -363,7 +363,7 @@ private function createRules(?Array_ $paths, ?Array_ $ignore): ?Array_ } if ($ignore !== null) { - $args[] = new Arg($ignore, name: new Identifier('ignnore')); + $args[] = new Arg($ignore, name: new Identifier('ignore')); } $pathObj = new New_(new Name(RequestPathRule::class), $args); diff --git a/tests/Rector/JwtAuthUpgradeRector/Fixture/path_and_ignore.php.inc b/tests/Rector/JwtAuthUpgradeRector/Fixture/path_and_ignore.php.inc index ec7ffea..18ef8cb 100644 --- a/tests/Rector/JwtAuthUpgradeRector/Fixture/path_and_ignore.php.inc +++ b/tests/Rector/JwtAuthUpgradeRector/Fixture/path_and_ignore.php.inc @@ -18,6 +18,6 @@ namespace JimTools\JwtAuth\Test\Rector\JwtAuthUpgradeRector\Fixture; use JimTools\JwtAuth\Middleware\JwtAuthentication; -$auth = new JwtAuthentication(new JimTools\JwtAuth\Options(), new JimTools\JwtAuth\Decoder\FirebaseDecoder(new JimTools\JwtAuth\Secret($_ENV['JWT_SECRET'], 'HS256')), [new JimTools\JwtAuth\Rules\RequestPathRule(path: ['/', '/api'], ignnore: ['/api/auth']), new JimTools\JwtAuth\Rules\RequestMethodRule()]); +$auth = new JwtAuthentication(new JimTools\JwtAuth\Options(), new JimTools\JwtAuth\Decoder\FirebaseDecoder(new JimTools\JwtAuth\Secret($_ENV['JWT_SECRET'], 'HS256')), [new JimTools\JwtAuth\Rules\RequestPathRule(path: ['/', '/api'], ignore: ['/api/auth']), new JimTools\JwtAuth\Rules\RequestMethodRule()]); ?>