1 | <?php declare(strict_types = 1); |
||
17 | class DefinitionBuilder extends AbstractDefinition |
||
18 | { |
||
19 | /** @var ClassDefinition[] Definition collection */ |
||
20 | protected $definitionCollection = []; |
||
21 | |||
22 | /** |
||
23 | * Add new class definition |
||
24 | * |
||
25 | * @param $className |
||
26 | * @param string $serviceName |
||
27 | * @return ClassBuilderInterface |
||
28 | * @throws ClassDefinitionAlreadyExistsException |
||
29 | */ |
||
30 | 5 | public function addDefinition($className, string $serviceName = null): ClassBuilderInterface |
|
49 | |||
50 | /** |
||
51 | * Convert to metadata collection |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | public function toMetadataCollection(): array |
||
64 | } |
||
65 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: