Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
38 | public function handle() |
||
39 | { |
||
40 | $this->comment('Cleaning sensordata table...'); |
||
41 | |||
42 | $maxAgeInDays = config('sensordata.delete_records_older_than_days', 365); |
||
43 | $cutOffDate = Carbon::now()->subDays($maxAgeInDays)->format('Y-m-d H:i:s'); |
||
|
|||
44 | $amountDeleted = Sensordata::where('created_at', '<', $cutOffDate)->delete(); |
||
45 | |||
46 | $this->info("Deleted {$amountDeleted} record(s) from the activity log."); |
||
47 | |||
48 | $this->comment('All done!'); |
||
49 | } |
||
51 |
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