diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a201cec..f54dd3e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3] + php: [8.4, 8.3, 8.2, 8.1, 8.0, 7.4, 7.3] dependency-version: [prefer-lowest, prefer-stable] name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} diff --git a/src/OptimizerChain.php b/src/OptimizerChain.php index db603e3..c95b09f 100644 --- a/src/OptimizerChain.php +++ b/src/OptimizerChain.php @@ -62,11 +62,11 @@ public function useLogger(LoggerInterface $log) return $this; } - public function optimize(string $pathToImage, string $pathToOutput = null) + public function optimize(string $pathToImage, ?string $pathToOutput = null) { if ($pathToOutput) { $check = copy($pathToImage, $pathToOutput); - if($check == false) { + if ($check == false) { throw new InvalidArgumentException("Cannot copy file"); } $pathToImage = $pathToOutput;