Passed
Push — master ( 8e215e...9fb19b )
by y
01:44
created
src/DB/EntityInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,5 +10,5 @@
 block discarded – undo
10 10
     /**
11 11
      * @return int
12 12
      */
13
-    public function getId ();
13
+    public function getId();
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/Statement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @param DB $db
23 23
      */
24
-    protected function __construct (DB $db) {
24
+    protected function __construct(DB $db) {
25 25
         $this->db = $db;
26 26
     }
27 27
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @param array $args
32 32
      * @return $this
33 33
      */
34
-    public function __invoke (array $args = null) {
34
+    public function __invoke(array $args = null) {
35 35
         $this->execute($args);
36 36
         return $this;
37 37
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @return string
43 43
      */
44
-    public function __toString () {
44
+    public function __toString() {
45 45
         return $this->queryString;
46 46
     }
47 47
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @return bool
55 55
      * @throws ArgumentCountError
56 56
      */
57
-    public function execute ($args = null) {
57
+    public function execute($args = null) {
58 58
         $this->db->getLogger()->__invoke($this->queryString);
59 59
         if ($result = !parent::execute($args)) {
60 60
             $info = $this->errorInfo();
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @return int
73 73
      */
74
-    public function getId (): int {
74
+    public function getId(): int {
75 75
         return (int)$this->db->lastInsertId();
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
src/DB/SQL/ExpressionInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,5 +10,5 @@
 block discarded – undo
10 10
     /**
11 11
      * @return string
12 12
      */
13
-    public function __toString ();
13
+    public function __toString();
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/AttributesTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * @return array
32 32
      */
33
-    public function getAttributes (): array {
33
+    public function getAttributes(): array {
34 34
         return $this->attributes ?? [];
35 35
     }
36 36
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param mixed $attr
39 39
      * @return bool
40 40
      */
41
-    public function offsetExists ($attr): bool {
41
+    public function offsetExists($attr): bool {
42 42
         return isset($this->attributes) and array_key_exists($attr, $this->attributes);
43 43
     }
44 44
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param mixed $attr
47 47
      * @return null|mixed
48 48
      */
49
-    public function offsetGet ($attr) {
49
+    public function offsetGet($attr) {
50 50
         return $this->attributes[$attr] ?? null;
51 51
     }
52 52
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @param mixed $attr
55 55
      * @param mixed $value
56 56
      */
57
-    public function offsetSet ($attr, $value): void {
57
+    public function offsetSet($attr, $value): void {
58 58
         if (isset($attr)) {
59 59
             $this->attributes[$attr] = $value;
60 60
         }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     /**
67 67
      * @param mixed $attr
68 68
      */
69
-    public function offsetUnset ($attr): void {
69
+    public function offsetUnset($attr): void {
70 70
         unset($this->attributes[$attr]);
71 71
     }
72 72
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @param array $attributes
75 75
      * @return $this
76 76
      */
77
-    public function setAttributes (array $attributes) {
77
+    public function setAttributes(array $attributes) {
78 78
         $this->attributes = $attributes;
79 79
         return $this;
80 80
     }
Please login to merge, or discard this patch.
src/DB/SQL/Predicate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      *
13 13
      * @return static
14 14
      */
15
-    public function not () {
15
+    public function not() {
16 16
         return static::factory($this->db, "NOT({$this})");
17 17
     }
18 18
 
Please login to merge, or discard this patch.
src/DB/SQL/Expression.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param DB $db
29 29
      * @param string $expression
30 30
      */
31
-    public function __construct (DB $db, string $expression) {
31
+    public function __construct(DB $db, string $expression) {
32 32
         $this->db = $db;
33 33
         $this->expression = $expression;
34 34
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * @return string
38 38
      */
39
-    public function __toString () {
39
+    public function __toString() {
40 40
         return $this->expression;
41 41
     }
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/FactoryTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      * @param array $args The first argument must be a {@link DB} instance.
18 18
      * @return static
19 19
      */
20
-    public static function __callStatic (string $ignored, array $args) {
20
+    public static function __callStatic(string $ignored, array $args) {
21 21
         /** @var DB $db */
22 22
         $db = $args[0];
23 23
         unset($args[0]);
Please login to merge, or discard this patch.
src/DB/SQL/AbstractTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     /**
15 15
      * @return string
16 16
      */
17
-    abstract public function __toString ();
17
+    abstract public function __toString();
18 18
 
19 19
     /**
20 20
      * @var DB
Please login to merge, or discard this patch.
src/DB/SQL/DateTimeTrait.php 1 patch
Spacing   +14 added lines, -14 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 Text::factory($this->db, $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 Text::factory($this->db, $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
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      *
94 94
      * @return Num
95 95
      */
96
-    public function minutes () {
96
+    public function minutes() {
97 97
         return Num::factory($this->db, $this->dateFormat([
98 98
             'mysql' => '%i',
99 99
             'sqlite' => '%M'
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *
106 106
      * @return Num
107 107
      */
108
-    public function month () {
108
+    public function month() {
109 109
         return Num::factory($this->db, $this->dateFormat('%m'));
110 110
     }
111 111
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      *
115 115
      * @return Num
116 116
      */
117
-    public function seconds () {
117
+    public function seconds() {
118 118
         return Num::factory($this->db, $this->dateFormat('%S'));
119 119
     }
120 120
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      *
124 124
      * @return Text
125 125
      */
126
-    public function time () {
126
+    public function time() {
127 127
         return Text::factory($this->db, $this->dateFormat([
128 128
             'mysql' => '%H:%i:%S',
129 129
             'sqlite' => '%H:%M:%S'
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      *
136 136
      * @return Num
137 137
      */
138
-    public function timestamp () {
138
+    public function timestamp() {
139 139
         if ($this->db->isSQLite()) {
140 140
             return Num::factory($this->db, "STRFTIME('%s',{$this})");
141 141
         }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      *
148 148
      * @return Num
149 149
      */
150
-    public function weekOfYear () {
150
+    public function weekOfYear() {
151 151
         return Num::factory($this->db, $this->dateFormat([
152 152
             'mysql' => '%U',
153 153
             'sqlite' => '%W'
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      *
160 160
      * @return Num
161 161
      */
162
-    public function year () {
162
+    public function year() {
163 163
         return Num::factory($this->db, $this->dateFormat('%Y'));
164 164
     }
165 165
 }
166 166
\ No newline at end of file
Please login to merge, or discard this patch.