12
0
Fork 0
mirror of https://github.com/n3w/helpers-cli-input.git synced 2026-02-04 10:13:55 +00:00

Fixed InputCollection::getArgumentsByIndex() so it returns NULL if the index does not exist instead of throwing an E_NOTICE message

This commit is contained in:
Alannah Kearney 2019-05-23 23:44:24 +10:00
commit 25f3fb8014

View file

@ -77,7 +77,7 @@ class InputCollection
public function getArgumentsByIndex(int $index): ?AbstractInputType public function getArgumentsByIndex(int $index): ?AbstractInputType
{ {
return $this->arguments[$index]; return $this->arguments[$index] ?? null;
} }
public function getArguments(): array public function getArguments(): array