From 72dea5070bd6ceb91d2a7b25c9235ea8355bc675 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 21 Feb 2024 22:16:00 +0000 Subject: [PATCH] Make dev dependencies an empty array if none are ...present --- src/Console/Command/TestCommand.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Console/Command/TestCommand.php b/src/Console/Command/TestCommand.php index a3f9045..0809cb9 100644 --- a/src/Console/Command/TestCommand.php +++ b/src/Console/Command/TestCommand.php @@ -20,8 +20,7 @@ final class TestCommand extends AbstractCommand associative: true, ); - // TODO: what if there are no dev dependencies? - $devDependencies = array_keys($json['require-dev']); + $devDependencies = array_keys($json['require-dev'] ?? []); // TODO: Pest and Behat. if (in_array(needle: 'brianium/paratest', haystack: $devDependencies, strict: true)) {