Passed
Push — master ( 15a419...b07fd7 )
by y
02:13
created
src/DB/SQL/DateTimeTrait.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      *
20 20
      * @return Text
21 21
      */
22
-    public function date () {
22
+    public function date() {
23 23
         return $this->dateFormat('%Y-%m-%d');
24 24
     }
25 25
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param string|string[] $format Format, or formats keyed by driver name.
30 30
      * @return Text
31 31
      */
32
-    public function dateFormat ($format) {
32
+    public function dateFormat($format) {
33 33
         if (is_array($format)) {
34 34
             $format = $format[$this->db->getDriver()];
35 35
         }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @return Text
47 47
      */
48
-    public function datetime () {
48
+    public function datetime() {
49 49
         return $this->dateFormat([
50 50
             'mysql' => '%Y-%m-%d %H:%i:%S',
51 51
             'sqlite' => '%Y-%m-%d %H:%M:%S'
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @return Num
59 59
      */
60
-    public function day () {
60
+    public function day() {
61 61
         return Num::factory($this->db, $this->dateFormat('%d'));
62 62
     }
63 63
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      *
67 67
      * @return Num
68 68
      */
69
-    public function dayOfWeek () {
69
+    public function dayOfWeek() {
70 70
         return Num::factory($this->db, $this->dateFormat('%w'));
71 71
     }
72 72
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      *
76 76
      * @return Num
77 77
      */
78
-    public function dayOfYear () {
78
+    public function dayOfYear() {
79 79
         return Num::factory($this->db, $this->dateFormat('%j'));
80 80
     }
81 81
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      *
85 85
      * @return Num
86 86
      */
87
-    public function hours () {
87
+    public function hours() {
88 88
         return Num::factory($this->db, $this->dateFormat('%H'));
89 89
     }
90 90
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      *
96 96
      * @return Text
97 97
      */
98
-    public function iso8601 () {
98
+    public function iso8601() {
99 99
         return $this->dateFormat([
100 100
             'mysql' => '%Y-%m-%dT%H:%i:%SZ',
101 101
             'sqlite' => '%Y-%m-%dT%H:%M:%SZ',
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      *
108 108
      * @return Num
109 109
      */
110
-    public function minutes () {
110
+    public function minutes() {
111 111
         return Num::factory($this->db, $this->dateFormat([
112 112
             'mysql' => '%i',
113 113
             'sqlite' => '%M'
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      *
120 120
      * @return Num
121 121
      */
122
-    public function month () {
122
+    public function month() {
123 123
         return Num::factory($this->db, $this->dateFormat('%m'));
124 124
     }
125 125
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      *
129 129
      * @return Num
130 130
      */
131
-    public function seconds () {
131
+    public function seconds() {
132 132
         return Num::factory($this->db, $this->dateFormat('%S'));
133 133
     }
134 134
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      *
138 138
      * @return Text
139 139
      */
140
-    public function time () {
140
+    public function time() {
141 141
         return $this->dateFormat([
142 142
             'mysql' => '%H:%i:%S',
143 143
             'sqlite' => '%H:%M:%S'
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      *
150 150
      * @return Num
151 151
      */
152
-    public function timestamp () {
152
+    public function timestamp() {
153 153
         if ($this->db->isSQLite()) {
154 154
             return Num::factory($this->db, "STRFTIME('%s',{$this})");
155 155
         }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      *
167 167
      * @return DateTime
168 168
      */
169
-    public function toLocalTz () {
169
+    public function toLocalTz() {
170 170
         if ($this->db->isSQLite()) {
171 171
             // docs:
172 172
             // > The "localtime" modifier (12) assumes the time value to its left is in
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      *
189 189
      * @return DateTime
190 190
      */
191
-    public function toUtc () {
191
+    public function toUtc() {
192 192
         if ($this->db->isSQLite()) {
193 193
             // docs:
194 194
             // > "utc" assumes that the time value to its left is in the local timezone
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      *
206 206
      * @return Num
207 207
      */
208
-    public function weekOfYear () {
208
+    public function weekOfYear() {
209 209
         return Num::factory($this->db, $this->dateFormat([
210 210
             'mysql' => '%U',
211 211
             'sqlite' => '%W'
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      *
218 218
      * @return Num
219 219
      */
220
-    public function year () {
220
+    public function year() {
221 221
         return Num::factory($this->db, $this->dateFormat('%Y'));
222 222
     }
223 223
 }
224 224
\ No newline at end of file
Please login to merge, or discard this patch.