1 | <?php |
||
19 | class PropertyRegistry { |
||
20 | |||
21 | /** |
||
22 | * @var AppFactory |
||
23 | */ |
||
24 | private $appFactory; |
||
25 | |||
26 | /** |
||
27 | * @since 2.0 |
||
28 | * |
||
29 | * @param AppFactory $appFactory |
||
30 | */ |
||
31 | 6 | public function __construct( AppFactory $appFactory ) { |
|
34 | |||
35 | /** |
||
36 | * @since 1.0 |
||
37 | * |
||
38 | * @param PropertyRegistry $propertyRegistry |
||
39 | * |
||
40 | * @return boolean |
||
41 | */ |
||
42 | 3 | public function registerOn( BasePropertyRegistry $propertyRegistry ) { |
|
43 | |||
44 | 3 | $definitions = $this->appFactory->getPropertyDefinitions(); |
|
45 | |||
46 | 3 | foreach ( $definitions as $key => $definition ) { |
|
47 | |||
48 | 2 | if ( !isset( $definition['id'] ) ) { |
|
49 | 1 | continue; |
|
50 | } |
||
51 | |||
52 | 1 | $this->addPropertyDefinition( $propertyRegistry, $definition ); |
|
53 | 3 | } |
|
54 | |||
55 | 3 | foreach ( $definitions->safeGet( '_EXIF', array() ) as $key => $definition ) { |
|
56 | |||
57 | 1 | if ( !isset( $definition['id'] ) ) { |
|
58 | continue; |
||
59 | } |
||
60 | |||
61 | 1 | $this->addPropertyDefinition( $propertyRegistry, $definition ); |
|
62 | 3 | } |
|
63 | |||
64 | 3 | return true; |
|
65 | } |
||
66 | |||
67 | /** |
||
68 | * @since 2.0 |
||
69 | * |
||
70 | * @param array $customFixedProperties |
||
71 | * @param array $fixedPropertyTablePrefix |
||
72 | */ |
||
73 | 2 | public function registerAsFixedProperties( &$customFixedProperties, &$fixedPropertyTablePrefix ) { |
|
101 | |||
102 | 2 | private function addPropertyDefinition( $propertyRegistry, $definition ) { |
|
137 | |||
138 | } |
||
139 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: