Completed
Pull Request — master (#41)
by
unknown
09:40
created
src/generator/CodeFileGenerator.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use gossi\codegen\config\CodeFileGeneratorConfig;
5 5
 use gossi\codegen\model\GenerateableInterface;
6
-use gossi\docblock\Docblock;
7 6
 use phootwork\lang\Text;
8 7
 
9 8
 /**
Please login to merge, or discard this patch.
src/model/PhpMethod.php 2 patches
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.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@
 block discarded – undo
22 22
 use gossi\codegen\model\parts\ParametersPart;
23 23
 use gossi\codegen\model\parts\ReferenceReturnPart;
24 24
 use gossi\codegen\model\parts\TypeDocblockGeneratorPart;
25
-use gossi\docblock\Docblock;
26 25
 use gossi\docblock\tags\ReturnTag;
27 26
 
28 27
 /**
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   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@
 block discarded – undo
47 47
 	}
48 48
 	
49 49
 	protected function writeBody(RoutineInterface $model) {
50
-        if ($this->config->getGeneratePsrCode()) {
51
-            $this->writer->writeln("\n{")->indent();
52
-        } else {
53
-            $this->writer->writeln(" {")->indent();
54
-        }
50
+		if ($this->config->getGeneratePsrCode()) {
51
+			$this->writer->writeln("\n{")->indent();
52
+		} else {
53
+			$this->writer->writeln(" {")->indent();
54
+		}
55 55
 
56 56
 		$this->writer->writeln(trim($model->getBody()));
57 57
 		$this->writer->outdent()->rtrim()->writeln('}');
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/generator/builder/ClassBuilder.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
 		$this->buildSignature($model);
23 23
 		
24 24
 		// body
25
-        if ($this->config->getGeneratePsrCode()) {
26
-            $this->writer->writeln("\n{")->indent();
27
-        } else {
28
-            $this->writer->writeln(" {\n")->indent();
29
-        }
25
+		if ($this->config->getGeneratePsrCode()) {
26
+			$this->writer->writeln("\n{")->indent();
27
+		} else {
28
+			$this->writer->writeln(" {\n")->indent();
29
+		}
30 30
 
31 31
 		$this->buildTraits($model);
32 32
 		$this->buildConstants($model);
Please login to merge, or discard this patch.
src/config/CodeGeneratorConfig.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 			'constantSorting' => CodeGenerator::SORT_CONSTANTS_DEFAULT,
41 41
 			'propertySorting' => CodeGenerator::SORT_PROPERTIES_DEFAULT,
42 42
 			'methodSorting' => CodeGenerator::SORT_METHODS_DEFAULT,
43
-            'generatePsrCode' => false
43
+			'generatePsrCode' => false
44 44
 		]);
45 45
 		
46 46
 		$resolver->setAllowedTypes('generateDocblock', 'bool');
@@ -110,14 +110,14 @@  discard block
 block discarded – undo
110 110
 		return $this->options['generateScalarTypeHints'];
111 111
 	}
112 112
 
113
-    /**
114
-     * Returns whether PSR-code compatible will be generated
115
-     *
116
-     * @return bool `true` if they will be generated and `false` if not
117
-     */
113
+	/**
114
+	 * Returns whether PSR-code compatible will be generated
115
+	 *
116
+	 * @return bool `true` if they will be generated and `false` if not
117
+	 */
118 118
 	public function getGeneratePsrCode() {
119
-        return $this->options['generatePsrCode'];
120
-    }
119
+		return $this->options['generatePsrCode'];
120
+	}
121 121
 	
122 122
 	/**
123 123
 	 * Returns whether sorting is enabled
@@ -175,11 +175,11 @@  discard block
 block discarded – undo
175 175
 		return $this;
176 176
 	}
177 177
 
178
-    /**
179
-     * @param bool $generate `true` if they will be generated and `false` if not
180
-     * @return $this
181
-     */
182
-    public function setGeneratePsrCode($generate) {
178
+	/**
179
+	 * @param bool $generate `true` if they will be generated and `false` if not
180
+	 * @return $this
181
+	 */
182
+	public function setGeneratePsrCode($generate) {
183 183
 		$this->options['generatePsrCode'] = $generate;
184 184
 		return $this;
185 185
 	}
Please login to merge, or discard this patch.