Completed
Push — master ( d67b8f...d63c9e )
by Thomas
02:04
created
src/model/PhpMethod.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -49,6 +49,9 @@
 block discarded – undo
49 49
 		return new static($name);
50 50
 	}
51 51
 	
52
+	/**
53
+	 * @param string $name
54
+	 */
52 55
 	public function __construct($name) {
53 56
 		parent::__construct($name);
54 57
 		$this->initParameters();
Please login to merge, or discard this patch.
src/parser/FileParser.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -17,6 +17,9 @@
 block discarded – undo
17 17
 	private $visitors;
18 18
 	private $filename;
19 19
 	
20
+	/**
21
+	 * @param string $filename
22
+	 */
20 23
 	public function __construct($filename) {
21 24
 		$this->filename = $filename;
22 25
 		$this->visitors = new Set();
Please login to merge, or discard this patch.
src/generator/builder/parts/RoutineBuilderPart.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 use gossi\codegen\model\AbstractModel;
5 5
 use gossi\codegen\model\RoutineInterface;
6 6
 
7
-Trait RoutineBuilderPart {
7
+trait RoutineBuilderPart {
8 8
 	
9 9
 	use TypeBuilderPart;
10 10
 	
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
src/parser/visitor/parts/ValueParserPart.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 * Returns whether this node is a boolean value
75 75
 	 * 
76 76
 	 * @param Node $node
77
-	 * @return boolean
77
+	 * @return boolean|null
78 78
 	 */
79 79
 	private function isBool(Node $node) {
80 80
 		if ($node instanceof ConstFetch) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * Returns whether this node is a null value
92 92
 	 * 
93 93
 	 * @param Node $node
94
-	 * @return boolean
94
+	 * @return boolean|null
95 95
 	 */
96 96
 	private function isNull(Node $node) {
97 97
 		if ($node instanceof ConstFetch) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 * Returns the value from a node
105 105
 	 *
106 106
 	 * @param Node $node
107
-	 * @return mixed
107
+	 * @return string
108 108
 	 */
109 109
 	private function getExpression(Node $node) {
110 110
 		if ($node instanceof ConstFetch) {
Please login to merge, or discard this patch.
src/config/CodeGeneratorConfig.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	/**
Please login to merge, or discard this patch.
src/model/parts/TypePart.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/generator/builder/parts/TypeBuilderPart.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
src/generator/builder/ParameterBuilder.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.