| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 12 | public function userWithEmailAlreadyExists(string $email, ?int $userIdToExclude = null): bool |
|
| 23 | { |
||
| 24 | 12 | $query = $this->queryFactory->selectQuery()->select(['id'])->from('user')->andWhere( |
|
| 25 | 12 | ['deleted_at IS' => null, 'email' => $email] |
|
| 26 | 12 | ); |
|
| 27 | |||
| 28 | 12 | if ($userIdToExclude !== null) { |
|
| 29 | 6 | $query->andWhere(['id !=' => $userIdToExclude]); |
|
| 30 | } |
||
| 31 | |||
| 32 | 12 | return $query->execute()->fetch('assoc') !== false; |
|
| 33 | } |
||
| 35 |
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