| Conditions | 5 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public static function formatSql(string $query): string |
||
| 17 | { |
||
| 18 | if (class_exists(\Doctrine\SqlFormatter\SqlFormatter::class)) { |
||
| 19 | return (new \Doctrine\SqlFormatter\SqlFormatter())->format($query); |
||
| 20 | } |
||
| 21 | if (class_exists(\SqlFormatter::class)) { |
||
|
|
|||
| 22 | return \SqlFormatter::format($query, !self::isCli()); |
||
| 23 | } |
||
| 24 | if (class_exists(\SilverStripe\View\Parsers\SQLFormatter::class)) { |
||
| 25 | $method = self::isCli() ? 'formatPlain' : 'formatHTML'; |
||
| 26 | $formatter = new \SilverStripe\View\Parsers\SQLFormatter; |
||
| 27 | return $formatter->$method($query); |
||
| 28 | } |
||
| 29 | return $query; |
||
| 30 | } |
||
| 47 |
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