@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * @return bool `true` if they will be generated and `false` if not |
| 238 | 238 | */ |
| 239 | 239 | public function getGenerateNullableTypes(): bool { |
| 240 | - return $this->options['generateNullableTypes']; |
|
| 240 | + return $this->options['generateNullableTypes']; |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /** |
@@ -247,8 +247,8 @@ discard block |
||
| 247 | 247 | * @return $this |
| 248 | 248 | */ |
| 249 | 249 | public function setGenerateNullableTypes(bool $generate) { |
| 250 | - $this->options['generateNullableTypes'] = $generate; |
|
| 251 | - return $this; |
|
| 250 | + $this->options['generateNullableTypes'] = $generate; |
|
| 251 | + return $this; |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | /** |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * @return bool |
| 73 | 73 | */ |
| 74 | 74 | public function getNullable(): bool { |
| 75 | - return $this->typeNullable; |
|
| 75 | + return $this->typeNullable; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | * @return $this |
| 83 | 83 | */ |
| 84 | 84 | public function setNullable(bool $nullable) { |
| 85 | - $this->typeNullable = $nullable; |
|
| 86 | - return $this; |
|
| 85 | + $this->typeNullable = $nullable; |
|
| 86 | + return $this; |
|
| 87 | 87 | } |
| 88 | 88 | } |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | || ($allowed && in_array($type, self::$php7typeHints))) |
| 39 | 39 | ) { |
| 40 | 40 | |
| 41 | - $type = isset(self::$typeHintMap[$type]) |
|
| 42 | - ? self::$typeHintMap[$type] |
|
| 43 | - : $type; |
|
| 41 | + $type = isset(self::$typeHintMap[$type]) |
|
| 42 | + ? self::$typeHintMap[$type] |
|
| 43 | + : $type; |
|
| 44 | 44 | |
| 45 | - if ($nullable && $model->getNullable()) { |
|
| 46 | - $type = '?' . $type; |
|
| 47 | - } |
|
| 45 | + if ($nullable && $model->getNullable()) { |
|
| 46 | + $type = '?' . $type; |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | 49 | return $type; |
| 50 | 50 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | protected function writeFunctionReturnType(RoutineInterface $model): void { |
| 45 | - $type = $this->getType($model, $this->config->getGenerateReturnTypeHints(), $this->config->getGenerateNullableTypes()); |
|
| 45 | + $type = $this->getType($model, $this->config->getGenerateReturnTypeHints(), $this->config->getGenerateNullableTypes()); |
|
| 46 | 46 | if ($type !== null && $this->config->getGenerateReturnTypeHints()) { |
| 47 | 47 | $this->writer->write(': ')->write($type); |
| 48 | 48 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | use TypeBuilderPart; |
| 14 | 14 | |
| 15 | 15 | public function build(AbstractModel $model): void { |
| 16 | - $type = $this->getType($model, $this->config->getGenerateScalarTypeHints(), $this->config->getGenerateNullableTypes()); |
|
| 16 | + $type = $this->getType($model, $this->config->getGenerateScalarTypeHints(), $this->config->getGenerateNullableTypes()); |
|
| 17 | 17 | if ($type !== null) { |
| 18 | 18 | $this->writer->write($type . ' '); |
| 19 | 19 | } |