Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function transform($str, array $mapping = null) |
||
15 | { |
||
16 | try { |
||
17 | return new \DateTime($str); |
||
18 | } catch (\Exception $e) { |
||
19 | throw new \Exception(sprintf('"%s" is not a supported date/time/datetime format. To know which formats are supported, please visit http://www.php.net/manual/en/datetime.formats.php', $str)); |
||
|
|||
20 | } |
||
21 | } |
||
22 | |||
33 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.