Make dev dependencies an empty array if none are

...present
This commit is contained in:
Oliver Davies 2024-02-21 22:16:00 +00:00
parent 084f6fb3c7
commit 72dea5070b

View file

@ -20,8 +20,7 @@ final class TestCommand extends AbstractCommand
associative: true, 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. // TODO: Pest and Behat.
if (in_array(needle: 'brianium/paratest', haystack: $devDependencies, strict: true)) { if (in_array(needle: 'brianium/paratest', haystack: $devDependencies, strict: true)) {