From c72e5c801c1b8ae1f284b804fd5111e6da4ec373 Mon Sep 17 00:00:00 2001 From: Casper Bakker Date: Sat, 16 Sep 2023 10:51:06 +0200 Subject: [PATCH] Phpstan level 4 --- .github/workflows/phpstan.yml | 2 +- src/Types/TypeCode128.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index db0f34d..70afc49 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -22,4 +22,4 @@ jobs: run: composer install --prefer-dist --no-progress --no-interaction - name: Run analysis - run: vendor/bin/phpstan analyse src --level 2 + run: vendor/bin/phpstan analyse src --level 4 diff --git a/src/Types/TypeCode128.php b/src/Types/TypeCode128.php index 27d3ea6..38fc618 100644 --- a/src/Types/TypeCode128.php +++ b/src/Types/TypeCode128.php @@ -165,7 +165,7 @@ public function getBarcodeData(string $code): Barcode $char_id = ord($char); if (($char_id >= 241) AND ($char_id <= 244)) { $code_data[] = $fnc_a[$char_id]; - } elseif (($char_id >= 0) AND ($char_id <= 95)) { + } elseif ($char_id <= 95) { $code_data[] = strpos($keys_a, $char); } else { throw new InvalidCharacterException('Char ' . $char . ' is unsupported');