Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2.003 |
Changes | 0 |
1 | <?php |
||
18 | 1 | protected function getOldLiveRuns() |
|
19 | { |
||
20 | /** @var DocumentManager $objectManager */ |
||
21 | 1 | $objectManager = $this->getObjectManager(); |
|
22 | /** @var Builder $queryBuilder */ |
||
23 | 1 | $queryBuilder = $objectManager->createQueryBuilder($this->getRunClass()); |
|
24 | 1 | $queryBuilder->find(); |
|
25 | 1 | $time = time() - 86400; |
|
26 | 1 | $date = \DateTime::createFromFormat('U', strval($time)); |
|
27 | 1 | if (false === $date) { |
|
28 | throw new \Exception("Could not create DateTime object from $time"); |
||
29 | } |
||
30 | 1 | $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
|
31 | 1 | $queryBuilder->field('lastHeartbeatAt')->lt($date); |
|
32 | |||
33 | 1 | return $queryBuilder->getQuery()->toArray(); |
|
34 | } |
||
36 |
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