| Conditions | 3 | 
| Paths | 2 | 
| Total Lines | 14 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 20 | public function handle() : void  | 
            ||
| 21 |     { | 
            ||
| 22 |         $begin = new DateTime($this->argument('date') ?? date('Y-m-d')); | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 23 |         $end   = new DateTime($this->argument('endDate') ?? date('Y-m-d')); | 
            ||
| 24 | |||
| 25 |         if($begin != $end) { | 
            ||
| 26 |             $period  = new DatePeriod($begin, DateInterval::createFromDateString('1 day'), $end); | 
            ||
| 27 |             foreach ($period as $dt){ | 
            ||
| 28 | $this->syncRates($dt);  | 
            ||
| 29 | }  | 
            ||
| 30 |         }else{ | 
            ||
| 31 | $this->syncRates($begin);  | 
            ||
| 32 | }  | 
            ||
| 33 | ExchangeRate::insertOrIgnore($this->rates);  | 
            ||
| 34 | }  | 
            ||
| 47 |