| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 12 | class DatetimeToStringConverter extends AbstractConverter |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $format; |
||
| 18 | protected $allowNulls; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * DatetimeToStringConverter constructor. |
||
| 22 | * @param $fieldName |
||
| 23 | * @param string $format |
||
| 24 | */ |
||
| 25 | public function __construct($fieldName, $outputFormat = 'Y-m-d H:i:s',$allowNulls = false) |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param $value |
||
| 34 | * @return mixed|null |
||
| 35 | */ |
||
| 36 | public function __invoke($value) |
||
| 56 |