Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e648bb7

Browse files
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
1 parent d63c9e6 commit e648bb7

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/config/CodeGeneratorConfig.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function setGenerateReturnTypeHints(bool $generate) {
237237
* @return bool `true` if they will be generated and `false` if not
238238
*/
239239
public function getGenerateNullableTypes(): bool {
240-
return $this->options['generateNullableTypes'];
240+
return $this->options['generateNullableTypes'];
241241
}
242242

243243
/**
@@ -247,8 +247,8 @@ public function getGenerateNullableTypes(): bool {
247247
* @return $this
248248
*/
249249
public function setGenerateNullableTypes(bool $generate) {
250-
$this->options['generateNullableTypes'] = $generate;
251-
return $this;
250+
$this->options['generateNullableTypes'] = $generate;
251+
return $this;
252252
}
253253

254254
/**

src/generator/builder/ParameterBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ParameterBuilder extends AbstractBuilder {
1313
use TypeBuilderPart;
1414

1515
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());
1717
if ($type !== null) {
1818
$this->writer->write($type . ' ');
1919
}

src/generator/builder/parts/RoutineBuilderPart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function writeParameters(RoutineInterface $model): void {
4242
}
4343

4444
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());
4646
if ($type !== null && $this->config->getGenerateReturnTypeHints()) {
4747
$this->writer->write(': ')->write($type);
4848
}

src/generator/builder/parts/TypeBuilderPart.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ private function getType(AbstractModel $model, bool $allowed, bool $nullable): ?
3838
|| ($allowed && in_array($type, self::$php7typeHints)))
3939
) {
4040

41-
$type = isset(self::$typeHintMap[$type])
42-
? self::$typeHintMap[$type]
43-
: $type;
41+
$type = isset(self::$typeHintMap[$type])
42+
? self::$typeHintMap[$type]
43+
: $type;
4444

45-
if ($nullable && $model->getNullable()) {
46-
$type = '?' . $type;
47-
}
45+
if ($nullable && $model->getNullable()) {
46+
$type = '?' . $type;
47+
}
4848

4949
return $type;
5050
}

src/model/parts/TypePart.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function getTypeDescription(): ?string {
7272
* @return bool
7373
*/
7474
public function getNullable(): bool {
75-
return $this->typeNullable;
75+
return $this->typeNullable;
7676
}
7777

7878
/**
@@ -82,7 +82,7 @@ public function getNullable(): bool {
8282
* @return $this
8383
*/
8484
public function setNullable(bool $nullable) {
85-
$this->typeNullable = $nullable;
86-
return $this;
85+
$this->typeNullable = $nullable;
86+
return $this;
8787
}
8888
}

0 commit comments

Comments
 (0)