Completed
Push — master ( 146f46...ce721c )
by Thomas
03:30
created
src/visitor/GeneratorNavigator.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -163,6 +163,9 @@  discard block
 block discarded – undo
163 163
 		return $this->constantSortFunc ?  : 'strcasecmp';
164 164
 	}
165 165
 
166
+	/**
167
+	 * @return callable
168
+	 */
166 169
 	private function getUseSortFunc() {
167 170
 		if (null !== $this->useStatementSortFunc) {
168 171
 			return $this->useStatemenentSortFunc;
@@ -203,6 +206,9 @@  discard block
 block discarded – undo
203 206
 		return self::$defaultUseStatementSortFunc;
204 207
 	}
205 208
 
209
+	/**
210
+	 * @return callable
211
+	 */
206 212
 	private function getMethodSortFunc() {
207 213
 		if (null !== $this->methodSortFunc) {
208 214
 			return $this->methodSortFunc;
@@ -228,6 +234,9 @@  discard block
 block discarded – undo
228 234
 		return self::$defaultMethodSortFunc;
229 235
 	}
230 236
 
237
+	/**
238
+	 * @return callable
239
+	 */
231 240
 	private function getPropertySortFunc() {
232 241
 		if (null !== $this->propertySortFunc) {
233 242
 			return $this->propertySortFunc;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	}
161 161
 
162 162
 	private function getConstantSortFunc() {
163
-		return $this->constantSortFunc ?  : 'strcasecmp';
163
+		return $this->constantSortFunc ?: 'strcasecmp';
164 164
 	}
165 165
 
166 166
 	private function getUseSortFunc() {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		}
170 170
 
171 171
 		if (empty(self::$defaultUseStatementSortFunc)) {
172
-			self::$defaultUseStatementSortFunc = function ($s1, $s2) {
172
+			self::$defaultUseStatementSortFunc = function($s1, $s2) {
173 173
 				// find first difference
174 174
 				$cmp1 = null;
175 175
 				$cmp2 = null;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 					return 0;
187 187
 				}
188 188
 
189
-				$getAscii = function ($str) {
189
+				$getAscii = function($str) {
190 190
 					$ord = ord($str);
191 191
 					if ($ord >= 65 && $ord <= 90) {
192 192
 						$ord += 32;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 		}
210 210
 
211 211
 		if (empty(self::$defaultMethodSortFunc)) {
212
-			self::$defaultMethodSortFunc = function ($a, $b) {
212
+			self::$defaultMethodSortFunc = function($a, $b) {
213 213
 				if ($a->isStatic() !== $isStatic = $b->isStatic()) {
214 214
 					return $isStatic ? 1 : -1;
215 215
 				}
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		}
235 235
 
236 236
 		if (empty(self::$defaultPropertySortFunc)) {
237
-			self::$defaultPropertySortFunc = function ($a, $b) {
237
+			self::$defaultPropertySortFunc = function($a, $b) {
238 238
 				if (($aV = $a->getVisibility()) !== $bV = $b->getVisibility()) {
239 239
 					$aV = 'public' === $aV ? 3 : ('protected' === $aV ? 2 : 1);
240 240
 					$bV = 'public' === $bV ? 3 : ('protected' === $bV ? 2 : 1);
Please login to merge, or discard this patch.
src/visitor/GeneratorVisitor.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -357,6 +357,9 @@
 block discarded – undo
357 357
 		}
358 358
 	}
359 359
 
360
+	/**
361
+	 * @param string $type
362
+	 */
360 363
 	protected function writeFunctionReturnType($type) {
361 364
 		if ($this->config->getGenerateReturnTypeHints() && $type != NULL && false === strpos($type, '|')) {
362 365
 			$this->writer->write(': ')->write($type);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -358,7 +358,7 @@
 block discarded – undo
358 358
 	}
359 359
 
360 360
 	protected function writeFunctionReturnType($type) {
361
-		if ($this->config->getGenerateReturnTypeHints() && $type != NULL && false === strpos($type, '|')) {
361
+		if ($this->config->getGenerateReturnTypeHints() && $type != null && false === strpos($type, '|')) {
362 362
 			$this->writer->write(': ')->write($type);
363 363
 		}
364 364
 	}
Please login to merge, or discard this patch.
src/model/AbstractPhpStruct.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -171,10 +171,10 @@
 block discarded – undo
171 171
 	 * 
172 172
 	 * If the class has already been declared you get only the set alias.
173 173
 	 * 
174
- 	 * @param string $qualifiedName
175
- 	 * @param null|string $alias
176
- 	 * @return string the used alias
177
- 	 */
174
+	 * @param string $qualifiedName
175
+	 * @param null|string $alias
176
+	 * @return string the used alias
177
+	 */
178 178
  	public function declareUse($qualifiedName, $alias = null) {
179 179
  		$qualifiedName = trim($qualifiedName, '\\');
180 180
  		if (!$this->hasUseStatement($qualifiedName)) {
Please login to merge, or discard this patch.
src/model/parts/ParamDocblockGeneratorTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 		foreach ($this->parameters as $param) {
15 15
 			$ptag = $param->getDocblockTag();
16 16
 
17
-			$tag = $tags->find($ptag, function (ParamTag $tag, ParamTag $ptag) {
17
+			$tag = $tags->find($ptag, function(ParamTag $tag, ParamTag $ptag) {
18 18
 				return $tag->getVariable() == $ptag->getVariable();
19 19
 			});
20 20
 
Please login to merge, or discard this patch.
src/config/CodeFileGeneratorConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
 				'headerDocblock' => null,
20 20
 				'blankLineAtEnd' => true,
21 21
 				'declareStrictTypes'  => false,
22
-				'generateScalarTypeHints' => function (Options $options) {
22
+				'generateScalarTypeHints' => function(Options $options) {
23 23
 					return $options['declareStrictTypes'];
24 24
 				},
25
-				'generateReturnTypeHints' => function (Options $options) {
25
+				'generateReturnTypeHints' => function(Options $options) {
26 26
 					return $options['declareStrictTypes'];
27 27
 				},
28 28
 			]);
Please login to merge, or discard this patch.
src/config/CodeGeneratorConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	protected function getDefaultOptions() {
42 42
 		return [
43 43
 			'generateDocblock' => true,
44
-			'generateEmptyDocblock' => function (Options $options) {
44
+			'generateEmptyDocblock' => function(Options $options) {
45 45
 				return $options['generateDocblock'];
46 46
 			},
47 47
 			'generateScalarTypeHints' => false,
Please login to merge, or discard this patch.