| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace crocodicstudio\crudbooster\commands; |
||
| 30 | public function handle() |
||
| 31 | { |
||
| 32 | |||
| 33 | |||
| 34 | $now = date('Y-m-d H:i:s'); |
||
| 35 | |||
| 36 | $this->comment('Mail Queues Started '.$now); |
||
| 37 | |||
| 38 | $queues = DB::table('cms_email_queues')->where('send_at', '<=', $now)->take($limit_an_hour)->get(); |
||
| 39 | |||
| 40 | $this->comment('Total Queues : '.count($queues)); |
||
| 41 | |||
| 42 | Cache::increment('total_email_sent', count($queues)); |
||
| 43 | Cache::put('last_email_sent', date('Y-m-d H:i:s')); |
||
| 44 | |||
| 45 | foreach ($queues as $q) { |
||
| 46 | if (filter_var($q->email_recipient, FILTER_VALIDATE_EMAIL) !== false) { |
||
| 47 | CRUDBooster::sendEmailQueue($queue); |
||
| 48 | $this->comment('Email send -> '.$q->subject); |
||
| 49 | } |
||
| 50 | DB::table('mailqueues')->where('id', $q->id)->delete(); |
||
| 51 | } |
||
| 54 |
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