| 1 | <?php |
||
| 20 | class Service extends CollectionValue implements ClassInterface |
||
| 21 | { |
||
| 22 | /** @var string Service unique name */ |
||
| 23 | protected $name; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Service constructor. |
||
| 27 | * |
||
| 28 | * @param string $name Service unique name |
||
| 29 | * |
||
| 30 | * @throws \InvalidArgumentException |
||
| 31 | */ |
||
| 32 | 1 | public function __construct($name) |
|
| 39 | |||
| 40 | /** {@inheritdoc} */ |
||
| 41 | 1 | public function toClassMetadata(ClassMetadata $metadata) |
|
| 45 | } |
||
| 46 |
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: