| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 48 | public function getValue() |
||
| 49 | { |
||
| 50 | $parts = mb_split(',', trim(substr($this->value, mb_stripos($this->value, self::DIRECTIVE) + mb_strlen(self::DIRECTIVE) + 1))); |
||
| 51 | $count = count($parts); |
||
| 52 | for ($i = 1; $i <= $count; $i++) { |
||
| 53 | foreach ($this->supportedDateFormats as $format) { |
||
| 54 | $dateTime = date_create_from_format($format, trim(implode(',', array_slice($parts, 0, $i)))); |
||
| 55 | if ($dateTime !== false) { |
||
| 56 | return date_format($dateTime, DATE_RFC850); |
||
| 57 | } |
||
| 58 | } |
||
| 59 | } |
||
| 60 | return null; |
||
| 61 | } |
||
| 62 | |||
| 74 |