| Conditions | 5 | 
| Paths | 9 | 
| Total Lines | 22 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 20 | public function record($logs)  | 
            ||
| 21 |     { | 
            ||
| 22 |         $file = config('stethoscope.log_file_storage.path').now()->format('Y-m-d'); | 
            ||
| 23 | |||
| 24 | $log = '';  | 
            ||
| 25 | |||
| 26 |         foreach ($logs as $resource => $report) { | 
            ||
| 27 | $method = $resource.'Message';  | 
            ||
| 28 | |||
| 29 |             if (method_exists($this, $method)) { | 
            ||
| 30 | $log .= $this->$method($report)."\n";  | 
            ||
| 31 | }  | 
            ||
| 32 | }  | 
            ||
| 33 | |||
| 34 |         if ($log != '') { | 
            ||
| 35 | $log = $this->timeMessage()."\n".$log;  | 
            ||
| 36 | |||
| 37 |             if ($this->storage->exists($file)) { | 
            ||
| 38 | $log = $this->storage->get($file)."\n \n".$log;  | 
            ||
| 39 | }  | 
            ||
| 40 | |||
| 41 | $this->storage->put($file, $log);  | 
            ||
| 42 | }  | 
            ||
| 50 |