1 | <?php |
||
26 | class DataManager extends TrackingManager |
||
27 | { |
||
28 | private $dataTransformerManager; |
||
29 | private $configuration; |
||
30 | private $eventDispatcher; |
||
31 | private $logger; |
||
32 | |||
33 | /** |
||
34 | * DataManager constructor. |
||
35 | */ |
||
36 | 2 | public function __construct(DataTransformerManager $dataTransformerManager, Configuration $configuration, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger) |
|
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function compileManager() |
||
48 | { |
||
49 | if (!$this->configuration->hasDataItems()) |
||
50 | { |
||
51 | $this->logger->notice('No DataItems or Datasets detected... Ignoring.'); |
||
52 | |||
53 | return; |
||
54 | } |
||
55 | |||
56 | $this->parseDataItems($this->configuration->getDataFolders()); |
||
57 | $this->parseDataSets($this->configuration->getDataSets()); |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * Get all of the DataItems and DataSets in this manager. |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | 2 | public function &getDataItems() |
|
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function getJailedDataItems() |
||
79 | |||
80 | /** |
||
81 | * Loop through all of the DataItems specified in `$folders`. Each folder will have contain just DataItems. |
||
82 | * |
||
83 | * For each folder, supported file type is read, parsed, and made available through `$this->getDataItems()` |
||
84 | * |
||
85 | * @param string[] $folders An array of folders to be searched for to contain DataItems |
||
86 | */ |
||
87 | 1 | public function parseDataItems($folders) |
|
103 | |||
104 | /** |
||
105 | * Loop through all of the DataSets specified in `$dataSets`. Each DataSet contains a name and a folder location. |
||
106 | * |
||
107 | * For each folder, supported file type is read, parsed, and made available through `$this->getDataItems()` |
||
108 | * |
||
109 | * @param string[] $dataSets An array of DataSets |
||
110 | */ |
||
111 | 1 | public function parseDataSets($dataSets) |
|
140 | |||
141 | /** |
||
142 | * {@inheritdoc} |
||
143 | */ |
||
144 | 2 | protected function handleTrackableItem(File $filePath, array $options = []) |
|
179 | } |
||
180 |
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: