| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 64 | public function getValue() |
||
| 65 | { |
||
| 66 | $parts = mb_split(',', trim(mb_substr($this->rule, mb_stripos($this->rule, $this->directive) + mb_strlen($this->directive) + 1))); |
||
| 67 | $count = count($parts); |
||
| 68 | for ($i = 1; $i <= $count; $i++) { |
||
| 69 | foreach (self::SUPPORTED_DATE_FORMATS as $format) { |
||
| 70 | $dateTime = date_create_from_format($format, trim(implode(',', array_slice($parts, 0, $i)))); |
||
| 71 | if ($dateTime !== false) { |
||
| 72 | return date_format($dateTime, DATE_RFC850); |
||
| 73 | } |
||
| 74 | } |
||
| 75 | } |
||
| 76 | return null; |
||
| 77 | } |
||
| 78 | } |
||
| 79 |