|
18 | 18 | */
|
19 | 19 | class PropertyInfoExtractor implements PropertyInfoExtractorInterface
|
20 | 20 | {
|
21 |
| - /** |
22 |
| - * @var PropertyListExtractorInterface[] |
23 |
| - */ |
24 | 21 | private $listExtractors;
|
25 |
| - |
26 |
| - /** |
27 |
| - * @var PropertyTypeExtractorInterface[] |
28 |
| - */ |
29 | 22 | private $typeExtractors;
|
30 |
| - |
31 |
| - /** |
32 |
| - * @var PropertyDescriptionExtractorInterface[] |
33 |
| - */ |
34 | 23 | private $descriptionExtractors;
|
35 |
| - |
36 |
| - /** |
37 |
| - * @var PropertyAccessExtractorInterface[] |
38 |
| - */ |
39 | 24 | private $accessExtractors;
|
40 | 25 |
|
41 | 26 | /**
|
42 |
| - * @param PropertyListExtractorInterface[] $listExtractors |
43 |
| - * @param PropertyTypeExtractorInterface[] $typeExtractors |
44 |
| - * @param PropertyDescriptionExtractorInterface[] $descriptionExtractors |
45 |
| - * @param PropertyAccessExtractorInterface[] $accessExtractors |
| 27 | + * @param iterable|PropertyListExtractorInterface[] $listExtractors |
| 28 | + * @param iterable|PropertyTypeExtractorInterface[] $typeExtractors |
| 29 | + * @param iterable|PropertyDescriptionExtractorInterface[] $descriptionExtractors |
| 30 | + * @param iterable|PropertyAccessExtractorInterface[] $accessExtractors |
46 | 31 | */
|
47 |
| - public function __construct(array $listExtractors = array(), array $typeExtractors = array(), array $descriptionExtractors = array(), array $accessExtractors = array()) |
| 32 | + public function __construct($listExtractors = array(), $typeExtractors = array(), $descriptionExtractors = array(), $accessExtractors = array()) |
48 | 33 | {
|
49 | 34 | $this->listExtractors = $listExtractors;
|
50 | 35 | $this->typeExtractors = $typeExtractors;
|
@@ -103,13 +88,13 @@ public function isWritable($class, $property, array $context = array())
|
103 | 88 | /**
|
104 | 89 | * Iterates over registered extractors and return the first value found.
|
105 | 90 | *
|
106 |
| - * @param array $extractors |
107 |
| - * @param string $method |
108 |
| - * @param array $arguments |
| 91 | + * @param iterable $extractors |
| 92 | + * @param string $method |
| 93 | + * @param array $arguments |
109 | 94 | *
|
110 | 95 | * @return mixed
|
111 | 96 | */
|
112 |
| - private function extract(array $extractors, $method, array $arguments) |
| 97 | + private function extract($extractors, $method, array $arguments) |
113 | 98 | {
|
114 | 99 | foreach ($extractors as $extractor) {
|
115 | 100 | $value = call_user_func_array(array($extractor, $method), $arguments);
|
|
0 commit comments