Conditions | 6 |
Paths | 3 |
Total Lines | 26 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | protected function getDbTargets() |
||
23 | { |
||
24 | if ($this->dbTargets === []) { |
||
25 | $log = Yii::$app->getLog(); |
||
26 | |||
27 | $usedTargets = []; |
||
28 | foreach ($log->targets as $target) { |
||
29 | if ($target instanceof Target) { |
||
30 | $currentTarget = [ |
||
31 | $target->db, |
||
32 | $target->logTable, |
||
33 | ]; |
||
34 | if (!in_array($currentTarget, $usedTargets, true)) { |
||
35 | // do not create same table twice |
||
36 | $usedTargets[] = $currentTarget; |
||
37 | $this->dbTargets[] = $target; |
||
38 | } |
||
39 | } |
||
40 | } |
||
41 | |||
42 | if ($this->dbTargets === []) { |
||
43 | throw new InvalidConfigException('You should configure "log" component to use one or more database targets before executing this migration.'); |
||
|
|||
44 | } |
||
45 | } |
||
46 | |||
47 | return $this->dbTargets; |
||
48 | } |
||
68 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths