@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * |
| 176 | 176 | * @return string|null |
| 177 | 177 | */ |
| 178 | - public function getFetchClass():?string |
|
| 178 | + public function getFetchClass(): ?string |
|
| 179 | 179 | { |
| 180 | 180 | return $this->fetchClass ?? null; |
| 181 | 181 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | * |
| 186 | 186 | * @return boolean|null |
| 187 | 187 | */ |
| 188 | - public function isScroll(bool $set = null):?bool |
|
| 188 | + public function isScroll(bool $set = null): ?bool |
|
| 189 | 189 | { |
| 190 | 190 | if ($set !== null) { |
| 191 | 191 | $this->scroll = true; |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | * |
| 258 | 258 | * @return PDOStatement |
| 259 | 259 | */ |
| 260 | - public function getStatement():?PDOStatement |
|
| 260 | + public function getStatement(): ?PDOStatement |
|
| 261 | 261 | { |
| 262 | 262 | return $this->statement; |
| 263 | 263 | } |
@@ -42,12 +42,12 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function field(string $name, string $type, $length = null) |
| 44 | 44 | { |
| 45 | - return $this->fields[$name] ?? $this->fields[$name] = ($length?new Field($this->name, $name, $type, $length):new Field($this->name, $name, $type)); |
|
| 45 | + return $this->fields[$name] ?? $this->fields[$name] = ($length ? new Field($this->name, $name, $type, $length) : new Field($this->name, $name, $type)); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function newField(string $name, string $type, $length = null) |
| 49 | 49 | { |
| 50 | - return $this->fields[$name] ?? $this->fields[$name] = ($length?new Field($this->name, $name, $type, $length):new Field($this->name, $name, $type)); |
|
| 50 | + return $this->fields[$name] ?? $this->fields[$name] = ($length ? new Field($this->name, $name, $type, $length) : new Field($this->name, $name, $type)); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | public function getField(string $name) |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $name = $this->getFieldName($property); |
| 74 | 74 | list($type, $length, $modifier) = $this->getFieldType($property); |
| 75 | - $field = new Field($tableName, $name, $type, $length); |
|
| 75 | + $field = new Field($tableName, $name, $type, $length); |
|
| 76 | 76 | $parser = new FieldModifierParser; |
| 77 | 77 | $parser->parse($modifier)->modify($field); |
| 78 | 78 | return $field; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | } else { |
| 129 | 129 | $length = null; |
| 130 | 130 | } |
| 131 | - return [$type, $length , trim($match[3] ?? '')]; |
|
| 131 | + return [$type, $length, trim($match[3] ?? '')]; |
|
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | 134 | return ['text', null, '']; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function parse(string $modifier) |
| 47 | 47 | { |
| 48 | - $this->tokens = \token_get_all('<?php '. $modifier); |
|
| 48 | + $this->tokens = \token_get_all('<?php '.$modifier); |
|
| 49 | 49 | $this->length = count($this->tokens); |
| 50 | 50 | $this->pos = 1; |
| 51 | 51 | $this->modifier = []; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | protected function skipWhiteComment() |
| 110 | 110 | { |
| 111 | - for ($i = $this->pos + 1; $i < $this->length ; $i++) { |
|
| 111 | + for ($i = $this->pos + 1; $i < $this->length; $i++) { |
|
| 112 | 112 | if (is_array($this->tokens[$i])) { |
| 113 | 113 | if (in_array($this->tokens[$i][0], [T_COMMENT, T_DOC_COMMENT, T_WHITESPACE])) { |
| 114 | 114 | $this->pos++; |