@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function setFetchMode(int $mode = PDO::FETCH_ASSOC, $arg0 = null, ?array $arg1 = null) { |
49 | 49 | $args = [$mode]; |
50 | - if($arg0 !== null) { |
|
50 | + if ($arg0 !== null) { |
|
51 | 51 | $args[] = $arg0; |
52 | 52 | } |
53 | - if($arg1 !== null) { |
|
53 | + if ($arg1 !== null) { |
|
54 | 54 | $args[] = $arg1; |
55 | 55 | } |
56 | 56 | $this->statement->setFetchMode(...$args); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->exceptionHandler(function() use ($params) { |
67 | 67 | $this->queryLoggers->logRegion($this->query, function() use ($params) { |
68 | 68 | $response = $this->statement->execute($params); |
69 | - if(!$response) { |
|
69 | + if (!$response) { |
|
70 | 70 | throw new SqlException('Execution returned with "false".'); |
71 | 71 | } |
72 | 72 | }); |
@@ -82,14 +82,14 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function fetchAll($fetchStyle = PDO::FETCH_ASSOC, $fetchArgument = null, array $ctorArgs = []): array { |
84 | 84 | $result = $this->exceptionHandler(function() use ($fetchStyle, $fetchArgument, $ctorArgs) { |
85 | - return $this->queryLoggers->logRegion($this->query, function () use ($fetchStyle, $fetchArgument, $ctorArgs) { |
|
86 | - if($fetchArgument !== null) { |
|
85 | + return $this->queryLoggers->logRegion($this->query, function() use ($fetchStyle, $fetchArgument, $ctorArgs) { |
|
86 | + if ($fetchArgument !== null) { |
|
87 | 87 | return $this->statement->fetchAll($fetchStyle, $fetchArgument, ...$ctorArgs); |
88 | 88 | } |
89 | 89 | return $this->statement->fetchAll($fetchStyle); |
90 | 90 | }); |
91 | 91 | }); |
92 | - if(is_bool($result)) { |
|
92 | + if (is_bool($result)) { |
|
93 | 93 | return []; |
94 | 94 | } |
95 | 95 | return $result; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function fetch($fetchStyle = PDO::FETCH_ASSOC, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) { |
105 | 105 | return $this->exceptionHandler(function() use ($fetchStyle, $cursorOrientation, $cursorOffset) { |
106 | - return $this->queryLoggers->logRegion($this->query, function () use ($fetchStyle, $cursorOrientation, $cursorOffset) { |
|
106 | + return $this->queryLoggers->logRegion($this->query, function() use ($fetchStyle, $cursorOrientation, $cursorOffset) { |
|
107 | 107 | return $this->statement->fetch($fetchStyle, $cursorOrientation, $cursorOffset); |
108 | 108 | }); |
109 | 109 | }); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function fetchColumn($columnNo = 0) { |
117 | 117 | return $this->exceptionHandler(function() use ($columnNo) { |
118 | - return $this->queryLoggers->logRegion($this->query, function () use ($columnNo) { |
|
118 | + return $this->queryLoggers->logRegion($this->query, function() use ($columnNo) { |
|
119 | 119 | return $this->statement->fetchColumn($columnNo); |
120 | 120 | }); |
121 | 121 | }); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | public function getColumnMeta(int $columnNo): ?array { |
147 | 147 | return $this->exceptionHandler(function() use ($columnNo) { |
148 | 148 | $columnMeta = $this->statement->getColumnMeta($columnNo); |
149 | - if($columnMeta === false) { |
|
149 | + if ($columnMeta === false) { |
|
150 | 150 | return null; |
151 | 151 | } |
152 | 152 | return $columnMeta; |