| Conditions | 7 |
| Paths | 7 |
| Total Lines | 24 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function run($request) |
||
| 18 | { |
||
| 19 | if (!Director::isLive()) { |
||
| 20 | $rows = DB::query('SHOW TABLES;'); |
||
| 21 | foreach ($rows as $row) { |
||
| 22 | if ($row) { |
||
| 23 | if (is_array($row)) { |
||
| 24 | foreach ($row as $db => $table) { |
||
| 25 | $this->truncateTable($table); |
||
| 26 | } |
||
| 27 | } else { |
||
| 28 | $table = $row['table'] ?? ''; |
||
| 29 | if ($table) { |
||
| 30 | $this->truncateTable($table); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 | } |
||
| 35 | FlushNowImplementor::do_flush('TRUNCATING ChangeSet'); |
||
| 36 | DB::query('TRUNCATE TABLE "ChangeSet";'); |
||
| 37 | FlushNowImplementor::do_flush('TRUNCATING ChangeSetItem'); |
||
| 38 | DB::query('TRUNCATE TABLE "ChangeSetItem";'); |
||
| 39 | } else { |
||
| 40 | FlushNowImplementor::do_flush('You need to set the environment to TEST or DEV to run this task.'); |
||
| 41 | } |
||
| 53 |
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