| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 67 | public function getCountriesUsingDistinctQuery() |
||
| 68 | { |
||
| 69 | // Note: there are many users whose country is ID 2 (UK). |
||
| 70 | // But the distinct should return only one country (including the count() call) |
||
| 71 | $sql = <<<SQL |
||
| 72 | SELECT DISTINCT country.* |
||
| 73 | FROM country |
||
| 74 | LEFT JOIN users ON users.country_id = country.id |
||
| 75 | WHERE country_id=2 |
||
| 76 | SQL; |
||
| 77 | |||
| 78 | return $this->findFromRawSql($sql); |
||
| 79 | } |
||
| 81 |
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