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