@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $connection->setAttribute(PDO::ATTR_PERSISTENT, true); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - foreach ($this->attributes as $key => $value){ |
|
| 40 | + foreach ($this->attributes as $key => $value) { |
|
| 41 | 41 | $connection->setAttribute($key, $value); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $connection->setAttribute(PDO::ATTR_PERSISTENT, true); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - foreach ($this->attributes as $key => $value){ |
|
| 39 | + foreach ($this->attributes as $key => $value) { |
|
| 40 | 40 | $connection->setAttribute($key, $value); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $connection->setAttribute(PDO::ATTR_PERSISTENT, true); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - foreach ($this->attributes as $key => $value){ |
|
| 32 | + foreach ($this->attributes as $key => $value) { |
|
| 33 | 33 | $connection->setAttribute($key, $value); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $connection->setAttribute(PDO::ATTR_PERSISTENT, true); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - foreach ($this->attributes as $key => $value){ |
|
| 42 | + foreach ($this->attributes as $key => $value) { |
|
| 43 | 43 | $connection->setAttribute($key, $value); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $connection->setAttribute(PDO::ATTR_PERSISTENT, true); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - foreach ($this->attributes as $key => $value){ |
|
| 44 | + foreach ($this->attributes as $key => $value) { |
|
| 45 | 45 | $connection->setAttribute($key, $value); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | |
| 87 | 87 | public function rowCount(): ?int |
| 88 | 88 | { |
| 89 | - return $this->lastStatement ? $this->lastStatement->rowCount() : null ; |
|
| 89 | + return $this->lastStatement ? $this->lastStatement->rowCount() : null; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | public function beginTransaction(): bool |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | $numFields = odbc_num_fields($statement); |
| 64 | - for ($i=1; $i<=$numFields; $i++) { |
|
| 64 | + for ($i = 1; $i <= $numFields; $i++) { |
|
| 65 | 65 | // odbc starts its indexes at 1 but since I am |
| 66 | 66 | // trying to emulate the functionality of *_fetch_array |
| 67 | 67 | // for other dbs (ie mysql) I'm going to decrement my |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $this->connect(); |
| 93 | 93 | |
| 94 | - list($updQuery, $binds, ) = $this->bindFromNamedToQuestions($query, $params); |
|
| 94 | + list($updQuery, $binds,) = $this->bindFromNamedToQuestions($query, $params); |
|
| 95 | 95 | $statement = odbc_prepare($this->connection, strval($updQuery)); |
| 96 | 96 | if (false !== $statement) { |
| 97 | 97 | $result = odbc_execute($statement, $binds); // @phpstan-ignore-line |
@@ -60,9 +60,9 @@ |
||
| 60 | 60 | { |
| 61 | 61 | $connection = new Driver\Manager(sprintf('mongodb://%s%s@%s%s/%s', |
| 62 | 62 | ($this->config->getUser()) ?: '', |
| 63 | - !empty($this->config->getPassword()) ? ':'. $this->config->getPassword() : '', |
|
| 63 | + !empty($this->config->getPassword()) ? ':' . $this->config->getPassword() : '', |
|
| 64 | 64 | $this->config->getLocation(), |
| 65 | - !empty($this->config->getPort()) ? ':'. $this->config->getPort() : '', |
|
| 65 | + !empty($this->config->getPort()) ? ':' . $this->config->getPort() : '', |
|
| 66 | 66 | $this->config->getDatabase() |
| 67 | 67 | ), $this->attributes); |
| 68 | 68 | |
@@ -149,21 +149,21 @@ discard block |
||
| 149 | 149 | $path .= (IRegistry::REG_NONE == $type) ? '\\' : ''; // none type = it's "dir", not "entry" |
| 150 | 150 | |
| 151 | 151 | if (IDriverSources::ACTION_INSERT == $action) { |
| 152 | - try{ |
|
| 152 | + try { |
|
| 153 | 153 | $this->connection->RegWrite($path, $content, static::$allowedTypes[$type]); |
| 154 | 154 | } catch (\Exception $e) { |
| 155 | 155 | throw new MapperException('Cannot write into registry', 0, $e); |
| 156 | 156 | } |
| 157 | 157 | } elseif (IDriverSources::ACTION_UPDATE == $action) { |
| 158 | - try{ |
|
| 158 | + try { |
|
| 159 | 159 | $this->connection->RegWrite($path, $content, static::$allowedTypes[$type]); |
| 160 | 160 | } catch (\Exception $e) { |
| 161 | 161 | throw new MapperException('Cannot write into registry', 0, $e); |
| 162 | 162 | } |
| 163 | 163 | } elseif (IDriverSources::ACTION_DELETE == $action) { |
| 164 | - try{ |
|
| 164 | + try { |
|
| 165 | 165 | $this->connection->RegDelete($path); |
| 166 | - } catch(\Exception $e) { |
|
| 166 | + } catch (\Exception $e) { |
|
| 167 | 167 | throw new MapperException('Cannot delete from registry', 0, $e); |
| 168 | 168 | } |
| 169 | 169 | } else { |
@@ -182,6 +182,6 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | protected function dropSlash(string $key): string |
| 184 | 184 | { |
| 185 | - return ('\\' == mb_substr($key, -1, 1)) ? mb_substr($key, 0, -1) : $key ; |
|
| 185 | + return ('\\' == mb_substr($key, -1, 1)) ? mb_substr($key, 0, -1) : $key; |
|
| 186 | 186 | } |
| 187 | 187 | } |