Conditions | 4 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function initDone() |
||
34 | { |
||
35 | $this->reload = true === $this->getProperties()->getProperty(static::RELOAD_PROPERTY, false); |
||
|
|||
36 | $workflows = $this->getProperties()->getProperty(static::WORKFLOWS_PROPERTY, false); |
||
37 | |||
38 | $basedir = null; |
||
39 | foreach ($workflows as $name => $workflowItem) { |
||
40 | $type = array_key_exists('type', $workflowItem) ? $workflowItem['type'] : WorkflowConfig::FILE_TYPE; |
||
41 | $location = array_key_exists('location', $workflowItem) ? $workflowItem['location'] : ''; |
||
42 | $config = $this->buildWorkflowConfig($basedir, $type, $location); |
||
43 | $this->workflows[$name] = $config; |
||
44 | } |
||
45 | } |
||
46 | } |
||
47 |
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: