1 | <?php |
||
25 | class FileDTODataTransformerBuilder implements ApplicationBuilder |
||
26 | { |
||
27 | /** |
||
28 | * Configuration array. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $configuration; |
||
33 | |||
34 | /** |
||
35 | * The container builder. |
||
36 | * |
||
37 | * @var ContainerBuilder |
||
38 | */ |
||
39 | protected $container; |
||
40 | |||
41 | /** |
||
42 | * The FQCN or the service id of file data transformer. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $dataTransformer; |
||
47 | |||
48 | /** |
||
49 | * Constructor. |
||
50 | * |
||
51 | * @param ContainerBuilder $container The container builder |
||
52 | * @param string $dataTransformer The FQCN or the service id of file data transformer |
||
53 | * @param array $configuration The configuration tree |
||
54 | */ |
||
55 | public function __construct(ContainerBuilder $container, $dataTransformer, array $configuration = []) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function build($file) |
||
83 | } |
||
84 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.