| Conditions | 4 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function handle() |
||
| 30 | { |
||
| 31 | $storageTime = (int) config('bibrex.storage_time.notifications'); |
||
| 32 | if ($storageTime <= 0) { |
||
| 33 | $this->logError('The `bibrex.storage_time.notifications` config value is invalid.'); |
||
| 34 | return; |
||
| 35 | } |
||
| 36 | |||
| 37 | $n = 0; |
||
| 38 | $m = 0; |
||
| 39 | |||
| 40 | // Check imported users |
||
| 41 | $notifications = ExtendedDatabaseNotification::where('created_at', '<', Carbon::now()->subDays($storageTime)) |
||
| 42 | ->get(); |
||
| 43 | |||
| 44 | foreach ($notifications as $notification) { |
||
| 45 | if ($notification->loan->trashed()) { |
||
| 46 | $notification->delete(); |
||
| 47 | $m++; |
||
| 48 | } |
||
| 49 | $n++; |
||
| 50 | } |
||
| 51 | |||
| 52 | $this->logInfo("Sletting av gamle meldinger: $m av $n meldinger eldre enn $storageTime dager ble slettet."); |
||
| 53 | } |
||
| 55 |
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