From 53954031b507c30e82cf0bd3e87460c0b437c344 Mon Sep 17 00:00:00 2001 From: Thomas Picquet Date: Fri, 28 Jan 2022 07:30:39 -0800 Subject: [PATCH] Fixed Areas attribute to work like the documentation specifies --- Annotation/Areas.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'); }