diff --git a/Annotation/Areas.php b/Annotation/Areas.php index c4bf48f..384b9fe 100644 --- a/Annotation/Areas.php +++ b/Annotation/Areas.php @@ -22,12 +22,12 @@ final class Areas public function __construct(array $properties) { - if (!array_key_exists('value', $properties) || !is_array($properties['value'])) { + if ($properties === []) { throw new \InvalidArgumentException('An array of areas was expected'); } $areas = []; - foreach ($properties['value'] as $area) { + foreach ($properties as $area) { if (!is_string($area)) { throw new \InvalidArgumentException('An area must be given as a string'); }