Passed
Push — master ( 22385c...22b347 )
by y
02:15
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/Column.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param string $name
39 39
      * @param string $qualifier
40 40
      */
41
-    public function __construct (DB $db, string $name, string $qualifier = '') {
41
+    public function __construct(DB $db, string $name, string $qualifier = '') {
42 42
         $this->db = $db;
43 43
         $this->name = $name;
44 44
         $this->qualifier = $qualifier;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      *
50 50
      * @return string
51 51
      */
52
-    public function __toString (): string {
52
+    public function __toString(): string {
53 53
         if (strlen($this->qualifier)) {
54 54
             return "{$this->qualifier}.{$this->name}";
55 55
         }
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
     /**
60 60
      * @return string
61 61
      */
62
-    final public function getName (): string {
62
+    final public function getName(): string {
63 63
         return $this->name;
64 64
     }
65 65
 
66 66
     /**
67 67
      * @return string
68 68
      */
69
-    final public function getQualifier (): string {
69
+    final public function getQualifier(): string {
70 70
         return $this->qualifier;
71 71
     }
72 72
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @param string $name
75 75
      * @return $this
76 76
      */
77
-    public function setName (string $name) {
77
+    public function setName(string $name) {
78 78
         $clone = clone $this;
79 79
         $clone->name = $name;
80 80
         return $clone;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      * @param string $qualifier
85 85
      * @return $this
86 86
      */
87
-    public function setQualifier (string $qualifier) {
87
+    public function setQualifier(string $qualifier) {
88 88
         $clone = clone $this;
89 89
         $clone->qualifier = $qualifier;
90 90
         return $clone;
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/AbstractTable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @return string
18 18
      */
19
-    abstract public function __toString ();
19
+    abstract public function __toString();
20 20
 
21 21
     /**
22 22
      * @param int|string $column
23 23
      * @return null|Column
24 24
      */
25
-    abstract public function offsetGet ($column);
25
+    abstract public function offsetGet($column);
26 26
 
27 27
     /**
28 28
      * @var DB
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     /**
33 33
      * @param DB $db
34 34
      */
35
-    public function __construct (DB $db) {
35
+    public function __construct(DB $db) {
36 36
         $this->db = $db;
37 37
     }
38 38
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * @param int|string $column
41 41
      * @return bool
42 42
      */
43
-    public function offsetExists ($column): bool {
43
+    public function offsetExists($column): bool {
44 44
         return $this->offsetGet($column) !== null;
45 45
     }
46 46
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @param void $value
52 52
      * @throws Exception
53 53
      */
54
-    final public function offsetSet ($offset, $value): void {
54
+    final public function offsetSet($offset, $value): void {
55 55
         throw new Exception('Tables are immutable.');
56 56
     }
57 57
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @param void $name
62 62
      * @throws Exception
63 63
      */
64
-    final public function offsetUnset ($name): void {
64
+    final public function offsetUnset($name): void {
65 65
         $this->offsetSet($name, null);
66 66
     }
67 67
 }
68 68
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/SQL.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
      * @param int|array|Countable $count
19 19
      * @return ExpressionInterface[]
20 20
      */
21
-    public static function marks ($count): array {
21
+    public static function marks($count): array {
22 22
         static $mark;
23 23
         $mark ??= new class implements ExpressionInterface {
24 24
 
25
-            public function __toString () {
25
+            public function __toString() {
26 26
                 return '?';
27 27
             }
28 28
         };
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * @param string[] $columns
42 42
      * @return string[] `["column" => ":column"]`
43 43
      */
44
-    public static function slots (array $columns): array {
44
+    public static function slots(array $columns): array {
45 45
         $slots = [];
46 46
         foreach ($columns as $column) {
47 47
             $slots[$column] = ':' . str_replace('.', '__', $column);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @param string[] $columns
54 54
      * @return string[] `["column" => "column=:column"]`
55 55
      */
56
-    public static function slotsEqual (array $columns): array {
56
+    public static function slotsEqual(array $columns): array {
57 57
         $slots = static::slots($columns);
58 58
         foreach ($slots as $column => $slot) {
59 59
             $slots[$column] = "{$column} = {$slot}";
@@ -61,6 +61,6 @@  discard block
 block discarded – undo
61 61
         return $slots;
62 62
     }
63 63
 
64
-    final private function __construct () {
64
+    final private function __construct() {
65 65
     }
66 66
 }
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB/SQL/Text.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      *
15 15
      * @return Numeric
16 16
      */
17
-    public function toFloat () {
17
+    public function toFloat() {
18 18
         if ($this->db->isSQLite()) {
19 19
             return Numeric::factory($this->db, "CAST({$this} AS REAL)");
20 20
         }
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @return Numeric
28 28
      */
29
-    public function toInt () {
29
+    public function toInt() {
30 30
         if ($this->db->isSQLite()) {
31 31
             return Numeric::factory($this->db, "CAST({$this} AS INTEGER)");
32 32
         }
Please login to merge, or discard this patch.
src/DB/SQL/NumericTrait.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  */
10 10
 trait NumericTrait {
11 11
 
12
-    abstract public function __toString ();
12
+    abstract public function __toString();
13 13
 
14 14
     /**
15 15
      * @var DB
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @return Numeric
23 23
      */
24
-    public function abs () {
24
+    public function abs() {
25 25
         return Numeric::factory($this->db, "ABS({$this})");
26 26
     }
27 27
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @param number|ValueInterface $arg
32 32
      * @return Numeric
33 33
      */
34
-    public function add ($arg) {
34
+    public function add($arg) {
35 35
         return Numeric::factory($this->db, "({$this} + {$arg})");
36 36
     }
37 37
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @return Numeric
42 42
      */
43
-    public function ceil () {
43
+    public function ceil() {
44 44
         return Numeric::factory($this->db, "CEIL({$this})");
45 45
     }
46 46
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @param number|ValueInterface $arg
51 51
      * @return Numeric
52 52
      */
53
-    public function divide ($arg) {
53
+    public function divide($arg) {
54 54
         return Numeric::factory($this->db, "({$this} / {$arg})");
55 55
     }
56 56
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      *
60 60
      * @return Numeric
61 61
      */
62
-    public function floor () {
62
+    public function floor() {
63 63
         return Numeric::factory($this->db, "FLOOR({$this})");
64 64
     }
65 65
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      *
69 69
      * @return Predicate
70 70
      */
71
-    public function isEven () {
71
+    public function isEven() {
72 72
         return Predicate::factory($this->db, "({$this} % 2) = 0");
73 73
     }
74 74
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @return Predicate
79 79
      */
80
-    public function isNegative () {
80
+    public function isNegative() {
81 81
         return Predicate::factory($this->db, "{$this} < 0");
82 82
     }
83 83
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      *
87 87
      * @return Predicate
88 88
      */
89
-    public function isOdd () {
89
+    public function isOdd() {
90 90
         return Predicate::factory($this->db, "({$this} % 2) <> 0");
91 91
     }
92 92
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      *
96 96
      * @return Predicate
97 97
      */
98
-    public function isPositive () {
98
+    public function isPositive() {
99 99
         return Predicate::factory($this->db, "{$this} > 0");
100 100
     }
101 101
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      * @param number|ValueInterface $arg
106 106
      * @return Numeric
107 107
      */
108
-    public function modulo ($arg) {
108
+    public function modulo($arg) {
109 109
         return Numeric::factory($this->db, "({$this} % {$arg})");
110 110
     }
111 111
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * @param number|ValueInterface $arg
116 116
      * @return Numeric
117 117
      */
118
-    public function multiply ($arg) {
118
+    public function multiply($arg) {
119 119
         return Numeric::factory($this->db, "({$this} * {$arg})");
120 120
     }
121 121
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @param number|ValueInterface $exponent
126 126
      * @return Numeric
127 127
      */
128
-    public function pow ($exponent) {
128
+    public function pow($exponent) {
129 129
         return Numeric::factory($this->db, "POW({$this},{$exponent})");
130 130
     }
131 131
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      * @param int $decimals
136 136
      * @return Numeric
137 137
      */
138
-    public function round (int $decimals = 0) {
138
+    public function round(int $decimals = 0) {
139 139
         return Numeric::factory($this->db, "ROUND({$this},{$decimals})");
140 140
     }
141 141
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      * @param number|ValueInterface $arg
146 146
      * @return Numeric
147 147
      */
148
-    public function subtract (ValueInterface $arg) {
148
+    public function subtract(ValueInterface $arg) {
149 149
         return Numeric::factory($this->db, "({$this} - {$arg})");
150 150
     }
151 151
 }
152 152
\ No newline at end of file
Please login to merge, or discard this patch.