mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-03-12 10:36:09 +03:00
Merge pull request #1955 from thomaspicquet/master
Fixed Areas attribute to work like the documentation specifies
This commit is contained in:
commit
7d827d5141
@ -23,6 +23,10 @@ final class Areas
|
||||
public function __construct(array $properties)
|
||||
{
|
||||
if (!array_key_exists('value', $properties) || !is_array($properties['value'])) {
|
||||
$properties['value'] = array_values($properties);
|
||||
}
|
||||
|
||||
if ([] === $properties['value']) {
|
||||
throw new \InvalidArgumentException('An array of areas was expected');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user