Passed
Push — master ( 1dcf9b...c6a312 )
by y
01:25
created
src/DB/SQL/AggregateTrait.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      *
15 15
      * @return Num
16 16
      */
17
-    public function avg () {
17
+    public function avg() {
18 18
         return Num::factory($this->db, "AVG({$this})");
19 19
     }
20 20
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @return Num
25 25
      */
26
-    public function avgDistinct () {
26
+    public function avgDistinct() {
27 27
         return Num::factory($this->db, "AVG(DISTINCT {$this})");
28 28
     }
29 29
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      *
33 33
      * @return Num
34 34
      */
35
-    public function count () {
35
+    public function count() {
36 36
         return Num::factory($this->db, "COUNT({$this})");
37 37
     }
38 38
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @return Num
43 43
      */
44
-    public function countDistinct () {
44
+    public function countDistinct() {
45 45
         return Num::factory($this->db, "COUNT(DISTINCT {$this})");
46 46
     }
47 47
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @param string $delimiter
52 52
      * @return Text
53 53
      */
54
-    public function groupConcat (string $delimiter = ',') {
54
+    public function groupConcat(string $delimiter = ',') {
55 55
         $delimiter = $this->db->quote($delimiter);
56 56
         if ($this->db->isSQLite()) {
57 57
             return Text::factory($this->db, "GROUP_CONCAT({$this},{$delimiter})");
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      *
65 65
      * @return Num
66 66
      */
67
-    public function max () {
67
+    public function max() {
68 68
         return Num::factory($this->db, "MAX({$this})");
69 69
     }
70 70
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @return Num
75 75
      */
76
-    public function min () {
76
+    public function min() {
77 77
         return Num::factory($this->db, "MIN({$this})");
78 78
     }
79 79
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      *
83 83
      * @return Num
84 84
      */
85
-    public function sum () {
85
+    public function sum() {
86 86
         return Num::factory($this->db, "SUM({$this})");
87 87
     }
88 88
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      *
92 92
      * @return Num
93 93
      */
94
-    public function sumDistinct () {
94
+    public function sumDistinct() {
95 95
         return Num::factory($this->db, "SUM(DISTINCT {$this})");
96 96
     }
97 97
 }
98 98
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/SQL/NumTrait.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      *
15 15
      * @return Num
16 16
      */
17
-    public function abs () {
17
+    public function abs() {
18 18
         return Num::factory($this->db, "ABS({$this})");
19 19
     }
20 20
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * @param number|ValueInterface $arg
25 25
      * @return Num
26 26
      */
27
-    public function add ($arg) {
27
+    public function add($arg) {
28 28
         return Num::factory($this->db, "({$this} + {$arg})");
29 29
     }
30 30
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      *
34 34
      * @return Num
35 35
      */
36
-    public function ceil () {
36
+    public function ceil() {
37 37
         return Num::factory($this->db, "CEIL({$this})");
38 38
     }
39 39
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      * @param number|ValueInterface $arg
44 44
      * @return Num
45 45
      */
46
-    public function divide ($arg) {
46
+    public function divide($arg) {
47 47
         return Num::factory($this->db, "({$this} / {$arg})");
48 48
     }
49 49
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @return Num
54 54
      */
55
-    public function floor () {
55
+    public function floor() {
56 56
         return Num::factory($this->db, "FLOOR({$this})");
57 57
     }
58 58
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * @return Predicate
63 63
      */
64
-    public function isEven () {
64
+    public function isEven() {
65 65
         return Predicate::factory($this->db, "({$this} % 2) = 0");
66 66
     }
67 67
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      *
71 71
      * @return Predicate
72 72
      */
73
-    public function isNegative () {
73
+    public function isNegative() {
74 74
         return Predicate::factory($this->db, "{$this} < 0");
75 75
     }
76 76
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      *
80 80
      * @return Predicate
81 81
      */
82
-    public function isOdd () {
82
+    public function isOdd() {
83 83
         return Predicate::factory($this->db, "({$this} % 2) <> 0");
84 84
     }
85 85
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      *
89 89
      * @return Predicate
90 90
      */
91
-    public function isPositive () {
91
+    public function isPositive() {
92 92
         return Predicate::factory($this->db, "{$this} > 0");
93 93
     }
94 94
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * @param number|ValueInterface $arg
99 99
      * @return Num
100 100
      */
101
-    public function mod ($arg) {
101
+    public function mod($arg) {
102 102
         return Num::factory($this->db, "({$this} % {$arg})");
103 103
     }
104 104
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      * @param number|ValueInterface $arg
109 109
      * @return Num
110 110
      */
111
-    public function multiply ($arg) {
111
+    public function multiply($arg) {
112 112
         return Num::factory($this->db, "({$this} * {$arg})");
113 113
     }
114 114
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * @param number|ValueInterface $exponent
119 119
      * @return Num
120 120
      */
121
-    public function pow ($exponent) {
121
+    public function pow($exponent) {
122 122
         return Num::factory($this->db, "POW({$this},{$exponent})");
123 123
     }
124 124
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      * @param int $decimals
129 129
      * @return Num
130 130
      */
131
-    public function round (int $decimals = 0) {
131
+    public function round(int $decimals = 0) {
132 132
         return Num::factory($this->db, "ROUND({$this},{$decimals})");
133 133
     }
134 134
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      * @param number|ValueInterface $arg
139 139
      * @return Num
140 140
      */
141
-    public function subtract (ValueInterface $arg) {
141
+    public function subtract(ValueInterface $arg) {
142 142
         return Num::factory($this->db, "({$this} - {$arg})");
143 143
     }
144 144
 }
145 145
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/SQL/TextTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @return Text
18 18
      */
19
-    public function hex () {
19
+    public function hex() {
20 20
         return Text::factory($this->db, "HEX({$this})");
21 21
     }
22 22
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @return Num
29 29
      */
30
-    public function length () {
30
+    public function length() {
31 31
         if ($this->db->isSQLite()) {
32 32
             return Num::factory($this->db, "LENGTH(CAST({$this} AS TEXT))");
33 33
         }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @return Text
43 43
      */
44
-    public function lower () {
44
+    public function lower() {
45 45
         return Text::factory($this->db, "LOWER({$this})");
46 46
     }
47 47
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @param string $substring
54 54
      * @return Num
55 55
      */
56
-    public function position (string $substring) {
56
+    public function position(string $substring) {
57 57
         $substring = $this->db->quote($substring);
58 58
         if ($this->db->isSQLite()) {
59 59
             return Num::factory($this->db, "INSTR({$this},{$substring})");
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @param string $replace
71 71
      * @return Text
72 72
      */
73
-    public function replace (string $search, string $replace) {
73
+    public function replace(string $search, string $replace) {
74 74
         $search = $this->db->quote($search);
75 75
         $replace = $this->db->quote($replace);
76 76
         return Text::factory($this->db, "REPLACE({$this},{$search},{$replace})");
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return Num
83 83
      */
84
-    public function size () {
84
+    public function size() {
85 85
         if ($this->db->isSQLite()) {
86 86
             return Num::factory($this->db, "LENGTH(CAST({$this} AS BLOB))");
87 87
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @param null|int $length
98 98
      * @return Text
99 99
      */
100
-    public function substr (int $start, int $length = null) {
100
+    public function substr(int $start, int $length = null) {
101 101
         if (isset($length)) {
102 102
             return Text::factory($this->db, "SUBSTR({$this},{$start},{$length})");
103 103
         }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *
112 112
      * @return Text
113 113
      */
114
-    public function upper () {
114
+    public function upper() {
115 115
         return Text::factory($this->db, "UPPER({$this})");
116 116
     }
117 117
 }
118 118
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/SQL/CastTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      * @param scalar[] $values
13 13
      * @return Value
14 14
      */
15
-    public function coalesce (array $values) {
15
+    public function coalesce(array $values) {
16 16
         array_unshift($values, $this);
17 17
         $values = $this->db->quoteList($values);
18 18
         return Value::factory($this->db, "COALESCE({$values})");
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @return Num
25 25
      */
26
-    public function toFloat () {
26
+    public function toFloat() {
27 27
         if ($this->db->isSQLite()) {
28 28
             return Num::factory($this->db, "CAST({$this} AS REAL)");
29 29
         }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      *
36 36
      * @return Num
37 37
      */
38
-    public function toInt () {
38
+    public function toInt() {
39 39
         if ($this->db->isSQLite()) {
40 40
             return Num::factory($this->db, "CAST({$this} AS INTEGER)");
41 41
         }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @return Text
49 49
      */
50
-    public function toText () {
50
+    public function toText() {
51 51
         if ($this->db->isSQLite()) {
52 52
             return Text::factory($this->db, "CAST({$this} AS TEXT)");
53 53
         }
Please login to merge, or discard this patch.