| Conditions | 3 | 
| Paths | 1 | 
| Total Lines | 16 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 12 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 35 | 1 | private function findLatestDateTimeFromNews(Company $company): string | |
| 36 |     { | ||
| 37 | 1 | $reduced = array_reduce( | |
| 38 | 1 | (array) $company->info(self::NEWS), | |
| 39 | 1 |             static function (?array $carry, array $current): array { | |
| 40 | 1 |                 if (null === $carry) { | |
|  | |||
| 41 | 1 | return $current; | |
| 42 | } | ||
| 43 | |||
| 44 | 1 | return $carry['datetime'] > $current['datetime'] | |
| 45 | 1 | ? $carry | |
| 46 | 1 | : $current; | |
| 47 | 1 | } | |
| 48 | ); | ||
| 49 | |||
| 50 | 1 | return $reduced['datetime']; | |
| 51 | } | ||
| 53 |