1 | <?php |
||
24 | class TagReader |
||
25 | { |
||
26 | /** |
||
27 | * @var MetadataInterface |
||
28 | */ |
||
29 | protected $metadata; |
||
30 | |||
31 | /** |
||
32 | * @var StreamInterface |
||
33 | */ |
||
34 | protected $stream; |
||
35 | |||
36 | /** |
||
37 | * @var HeaderReader |
||
38 | */ |
||
39 | protected $headerReader; |
||
40 | |||
41 | /** |
||
42 | * Create ID3v2 tag reader. |
||
43 | * |
||
44 | * @param MetadataInterface $metadata |
||
45 | * @param StreamInterface $stream |
||
46 | */ |
||
47 | public function __construct(MetadataInterface $metadata, StreamInterface $stream) |
||
52 | |||
53 | /** |
||
54 | * Get header reader. |
||
55 | * |
||
56 | * @return HeaderReader |
||
57 | */ |
||
58 | public function getHeaderReader() |
||
66 | |||
67 | /** |
||
68 | * Read data. |
||
69 | * |
||
70 | * @param HeaderInterface $header |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | protected function readData(HeaderInterface $header) |
||
89 | |||
90 | /** |
||
91 | * Create data stream. |
||
92 | * |
||
93 | * @param string $data |
||
94 | * |
||
95 | * @return StreamInterface |
||
96 | */ |
||
97 | protected function createDataStream($data) |
||
106 | |||
107 | /** |
||
108 | * Read ID3v2 tag. |
||
109 | * |
||
110 | * @return null|TagInterface |
||
111 | */ |
||
112 | public function read() |
||
153 | } |
||
154 |
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: