@@ -25,10 +25,10 @@ |
||
25 | 25 | * |
26 | 26 | * @return string |
27 | 27 | */ |
28 | - function render() : string; |
|
28 | + function render() : string; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Renders the string and echos it. |
32 | 32 | */ |
33 | - function display() : void; |
|
33 | + function display() : void; |
|
34 | 34 | } |
@@ -23,18 +23,18 @@ |
||
23 | 23 | * @see Microtime::ERROR_FAILED_CREATING_DATE_OBJECT |
24 | 24 | * @see Microtime::ERROR_FAILED_CONVERTING_STRING |
25 | 25 | */ |
26 | - public function __construct($datetime='now', DateTimeZone $timeZone=null) |
|
26 | + public function __construct($datetime = 'now', DateTimeZone $timeZone = null) |
|
27 | 27 | { |
28 | - if($timeZone === null) |
|
28 | + if ($timeZone === null) |
|
29 | 29 | { |
30 | 30 | $timeZone = new DateTimeZone(date_default_timezone_get()); |
31 | 31 | } |
32 | 32 | |
33 | - if(empty($datetime) || $datetime === 'now') |
|
33 | + if (empty($datetime) || $datetime === 'now') |
|
34 | 34 | { |
35 | 35 | $dateObj = DateTime::createFromFormat('0.u00 U', microtime(), new DateTimeZone('America/Denver')); |
36 | 36 | |
37 | - if($dateObj === false) { |
|
37 | + if ($dateObj === false) { |
|
38 | 38 | throw new ConvertHelper_Exception( |
39 | 39 | 'Failed to create microseconds date.', |
40 | 40 | '', |
@@ -49,8 +49,7 @@ |
||
49 | 49 | try |
50 | 50 | { |
51 | 51 | parent::__construct($datetime, $timeZone); |
52 | - } |
|
53 | - catch (Exception $e) |
|
52 | + } catch (Exception $e) |
|
54 | 53 | { |
55 | 54 | throw new ConvertHelper_Exception( |
56 | 55 | 'Failed to create date from string.', |