Passed
Push — master ( 6822a9...ff844e )
by y
01:33
created
src/DB/AbstractTable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     /**
20 20
      * @param DB $db
21 21
      */
22
-    public function __construct (DB $db) {
22
+    public function __construct(DB $db) {
23 23
         $this->db = $db;
24 24
     }
25 25
 
@@ -28,19 +28,19 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @return string
30 30
      */
31
-    abstract public function __toString ();
31
+    abstract public function __toString();
32 32
 
33 33
     /**
34 34
      * @param string $name
35 35
      * @return bool
36 36
      */
37
-    abstract public function offsetExists ($name): bool;
37
+    abstract public function offsetExists($name): bool;
38 38
 
39 39
     /**
40 40
      * @param string $name
41 41
      * @return Column
42 42
      */
43
-    abstract public function offsetGet ($name);
43
+    abstract public function offsetGet($name);
44 44
 
45 45
     /**
46 46
      * Throws.
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      * @param void $value
50 50
      * @throws Exception
51 51
      */
52
-    final public function offsetSet ($name, $value): void {
52
+    final public function offsetSet($name, $value): void {
53 53
         throw new Exception('Tables are immutable.');
54 54
     }
55 55
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @param void $name
60 60
      * @throws Exception
61 61
      */
62
-    final public function offsetUnset ($name): void {
62
+    final public function offsetUnset($name): void {
63 63
         $this->offsetSet($name, null);
64 64
     }
65 65
 }
66 66
\ No newline at end of file
Please login to merge, or discard this patch.
src/DB.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @param string $passwd
54 54
      * @param array $options
55 55
      */
56
-    public function __construct ($dsn, $username = null, $passwd = null, $options = null) {
56
+    public function __construct($dsn, $username = null, $passwd = null, $options = null) {
57 57
         parent::__construct($dsn, $username, $passwd, $options);
58 58
         $this->driver = $this->getAttribute(self::ATTR_DRIVER_NAME);
59 59
         $this->setAttribute(self::ATTR_DEFAULT_FETCH_MODE, self::FETCH_ASSOC);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param string $sql
76 76
      * @return int
77 77
      */
78
-    public function exec ($sql): int {
78
+    public function exec($sql): int {
79 79
         $this->logger->__invoke($sql);
80 80
         return parent::exec($sql);
81 81
     }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * @return string
85 85
      */
86
-    final public function getDriver (): string {
86
+    final public function getDriver(): string {
87 87
         return $this->driver;
88 88
     }
89 89
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @param string $interface
94 94
      * @return Junction
95 95
      */
96
-    public function getJunction ($interface) {
96
+    public function getJunction($interface) {
97 97
         if (!isset($this->junctions[$interface])) {
98 98
             $this->junctions[$interface] = Junction::fromInterface($this, $interface);
99 99
         }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * @return Closure
105 105
      */
106
-    public function getLogger () {
106
+    public function getLogger() {
107 107
         return $this->logger;
108 108
     }
109 109
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @param string|EntityInterface $class
114 114
      * @return Record
115 115
      */
116
-    public function getRecord ($class) {
116
+    public function getRecord($class) {
117 117
         $name = $class;
118 118
         if (is_object($name)) {
119 119
             $name = get_class($name);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      * @param mixed $b
139 139
      * @return string
140 140
      */
141
-    public function match ($a, $b) {
141
+    public function match($a, $b) {
142 142
         if ($b instanceof Closure) {
143 143
             if (!$a instanceof Column) {
144 144
                 $a = new Column($this, $a);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * @param array $match
165 165
      * @return string[]
166 166
      */
167
-    public function matchArray (array $match) {
167
+    public function matchArray(array $match) {
168 168
         return array_map([$this, 'match'], array_keys($match), $match);
169 169
     }
170 170
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      * @param string $access Class or interface name.
173 173
      * @return bool
174 174
      */
175
-    public function offsetExists ($access): bool {
175
+    public function offsetExists($access): bool {
176 176
         return (bool)$this->offsetGet($access);
177 177
     }
178 178
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * @param string $access Class or interface name.
181 181
      * @return null|Record|Junction
182 182
      */
183
-    public function offsetGet ($access) {
183
+    public function offsetGet($access) {
184 184
         if (class_exists($access)) {
185 185
             return $this->getRecord($access);
186 186
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      * @param void $value
198 198
      * @throws Exception
199 199
      */
200
-    final public function offsetSet ($access, $value): void {
200
+    final public function offsetSet($access, $value): void {
201 201
         throw new Exception('The schema is immutable.');
202 202
     }
203 203
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      * @param void $access
208 208
      * @throws Exception
209 209
      */
210
-    final public function offsetUnset ($access): void {
210
+    final public function offsetUnset($access): void {
211 211
         $this->offsetSet($access, null);
212 212
     }
213 213
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      * @param array $options
219 219
      * @return Statement
220 220
      */
221
-    public function prepare ($sql, $options = []) {
221
+    public function prepare($sql, $options = []) {
222 222
         $this->logger->__invoke($sql);
223 223
         /** @var Statement $statement */
224 224
         $statement = parent::prepare($sql, $options);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      * @param array $ctorargs
235 235
      * @return Statement
236 236
      */
237
-    public function query ($sql, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, array $ctorargs = []) {
237
+    public function query($sql, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, array $ctorargs = []) {
238 238
         $this->logger->__invoke($sql);
239 239
         /** @var Statement $statement */
240 240
         $statement = parent::query(...func_get_args());
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
      * @param int $type Ignored.
254 254
      * @return string
255 255
      */
256
-    public function quote ($value, $type = null) {
256
+    public function quote($value, $type = null) {
257 257
         if ($value instanceof ExpressionInterface) {
258 258
             return (string)$value;
259 259
         }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      * @param array $values
274 274
      * @return string[]
275 275
      */
276
-    public function quoteArray (array $values): array {
276
+    public function quoteArray(array $values): array {
277 277
         return array_map([$this, 'quote'], $values);
278 278
     }
279 279
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      * @param mixed $value
284 284
      * @return string|string[]
285 285
      */
286
-    public function quoteMixed ($value) {
286
+    public function quoteMixed($value) {
287 287
         if (is_array($value)) {
288 288
             return $this->quoteArray($value);
289 289
         }
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      * @param EntityInterface $entity
297 297
      * @return int ID
298 298
      */
299
-    public function save (EntityInterface $entity): int {
299
+    public function save(EntityInterface $entity): int {
300 300
         return $this->getRecord($entity)->save($entity);
301 301
     }
302 302
 
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      * @param Closure $logger
305 305
      * @return $this
306 306
      */
307
-    public function setLogger (Closure $logger) {
307
+    public function setLogger(Closure $logger) {
308 308
         $this->logger = $logger;
309 309
         return $this;
310 310
     }
Please login to merge, or discard this patch.