@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | trait DateTimeTrait { |
14 | 14 | |
15 | - abstract public function __toString (); |
|
15 | + abstract public function __toString(); |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @var DB |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @return Text |
26 | 26 | */ |
27 | - public function getDate () { |
|
27 | + public function getDate() { |
|
28 | 28 | return Text::factory($this->db, $this->getDateTimeFormat('%Y-%m-%d')); |
29 | 29 | } |
30 | 30 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @return Text |
35 | 35 | */ |
36 | - public function getDateTime () { |
|
36 | + public function getDateTime() { |
|
37 | 37 | return Text::factory($this->db, $this->getDateTimeFormat([ |
38 | 38 | 'mysql' => '%Y-%m-%d %H:%i:%S', |
39 | 39 | 'sqlite' => '%Y-%m-%d %H:%M:%S' |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param string|string[] $format Format, or formats keyed by driver name. |
47 | 47 | * @return Text |
48 | 48 | */ |
49 | - public function getDateTimeFormat ($format) { |
|
49 | + public function getDateTimeFormat($format) { |
|
50 | 50 | if (is_array($format)) { |
51 | 51 | $format = $format[$this->db->getDriver()]; |
52 | 52 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @return Numeric |
64 | 64 | */ |
65 | - public function getDay () { |
|
65 | + public function getDay() { |
|
66 | 66 | return Numeric::factory($this->db, $this->getDateTimeFormat('%d')); |
67 | 67 | } |
68 | 68 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * |
72 | 72 | * @return Numeric |
73 | 73 | */ |
74 | - public function getDayOfWeek () { |
|
74 | + public function getDayOfWeek() { |
|
75 | 75 | return Numeric::factory($this->db, $this->getDateTimeFormat('%w')); |
76 | 76 | } |
77 | 77 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @return Numeric |
82 | 82 | */ |
83 | - public function getDayOfYear () { |
|
83 | + public function getDayOfYear() { |
|
84 | 84 | return Numeric::factory($this->db, $this->getDateTimeFormat('%j')); |
85 | 85 | } |
86 | 86 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | * |
90 | 90 | * @return Numeric |
91 | 91 | */ |
92 | - public function getHours () { |
|
92 | + public function getHours() { |
|
93 | 93 | return Numeric::factory($this->db, $this->getDateTimeFormat('%H')); |
94 | 94 | } |
95 | 95 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @return Numeric |
100 | 100 | */ |
101 | - public function getMinutes () { |
|
101 | + public function getMinutes() { |
|
102 | 102 | return Numeric::factory($this->db, $this->getDateTimeFormat([ |
103 | 103 | 'mysql' => '%i', |
104 | 104 | 'sqlite' => '%M' |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * |
111 | 111 | * @return Numeric |
112 | 112 | */ |
113 | - public function getMonth () { |
|
113 | + public function getMonth() { |
|
114 | 114 | return Numeric::factory($this->db, $this->getDateTimeFormat('%m')); |
115 | 115 | } |
116 | 116 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * |
120 | 120 | * @return Numeric |
121 | 121 | */ |
122 | - public function getSeconds () { |
|
122 | + public function getSeconds() { |
|
123 | 123 | return Numeric::factory($this->db, $this->getDateTimeFormat('%S')); |
124 | 124 | } |
125 | 125 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * |
129 | 129 | * @return Text |
130 | 130 | */ |
131 | - public function getTime () { |
|
131 | + public function getTime() { |
|
132 | 132 | return Text::factory($this->db, $this->getDateTimeFormat([ |
133 | 133 | 'mysql' => '%H:%i:%S', |
134 | 134 | 'sqlite' => '%H:%M:%S' |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * |
141 | 141 | * @return Numeric |
142 | 142 | */ |
143 | - public function getTimestamp () { |
|
143 | + public function getTimestamp() { |
|
144 | 144 | if ($this->db->isSQLite()) { |
145 | 145 | return Numeric::factory($this->db, "STRFTIME('%s',{$this})"); |
146 | 146 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | * |
153 | 153 | * @return Numeric |
154 | 154 | */ |
155 | - public function getWeekOfYear () { |
|
155 | + public function getWeekOfYear() { |
|
156 | 156 | return Numeric::factory($this->db, $this->getDateTimeFormat([ |
157 | 157 | 'mysql' => '%U', |
158 | 158 | 'sqlite' => '%W' |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * |
165 | 165 | * @return Numeric |
166 | 166 | */ |
167 | - public function getYear () { |
|
167 | + public function getYear() { |
|
168 | 168 | return Numeric::factory($this->db, $this->getDateTimeFormat('%Y')); |
169 | 169 | } |
170 | 170 | } |
171 | 171 | \ No newline at end of file |