@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | case 'number': |
24 | 24 | return 'float'; |
25 | 25 | case 'array': |
26 | - return static::getPhpTypeFromSwaggerArrayType($items) . '[]'; |
|
26 | + return static::getPhpTypeFromSwaggerArrayType($items).'[]'; |
|
27 | 27 | case 'object': |
28 | 28 | return '\\stdClass'; |
29 | 29 | case 'string': |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | case 'number': |
87 | 87 | return 'float'; |
88 | 88 | case 'array': |
89 | - return static::getPhpTypeFromSwaggerDefinitionName($items['$ref']) . '[]'; |
|
89 | + return static::getPhpTypeFromSwaggerDefinitionName($items['$ref']).'[]'; |
|
90 | 90 | default: |
91 | 91 | return $type; |
92 | 92 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $operationName = $operationConfiguration['operationId']; |
36 | 36 | } else { |
37 | 37 | $hasPathParameters = preg_match('#{[^{]+}#', $path); |
38 | - $operationName = strtolower($operation) . ($hasPathParameters ? 'Item' : 'Collection'); |
|
38 | + $operationName = strtolower($operation).($hasPathParameters ? 'Item' : 'Collection'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $operationName = self::camelize($operationName); |
@@ -55,15 +55,15 @@ |
||
55 | 55 | $this->override = $override; |
56 | 56 | |
57 | 57 | $this->modelGenerator->configure( |
58 | - $folder . '/' . static::TYPE_MODEL, |
|
59 | - $namespace . '\\' . static::TYPE_MODEL, |
|
58 | + $folder.'/'.static::TYPE_MODEL, |
|
59 | + $namespace.'\\'.static::TYPE_MODEL, |
|
60 | 60 | $indent |
61 | 61 | ); |
62 | 62 | |
63 | 63 | $this->operationsGenerator->configure( |
64 | - $folder . '/' . static::TYPE_OPERATIONS, |
|
65 | - $namespace . '\\' . static::TYPE_OPERATIONS, |
|
66 | - $namespace . '\\' . static::TYPE_MODEL, |
|
64 | + $folder.'/'.static::TYPE_OPERATIONS, |
|
65 | + $namespace.'\\'.static::TYPE_OPERATIONS, |
|
66 | + $namespace.'\\'.static::TYPE_MODEL, |
|
67 | 67 | $indent |
68 | 68 | ); |
69 | 69 |
@@ -62,11 +62,11 @@ |
||
62 | 62 | */ |
63 | 63 | public function orderMethods(): void |
64 | 64 | { |
65 | - uksort($this->methods, function ($k1, $k2) { |
|
65 | + uksort($this->methods, function($k1, $k2) { |
|
66 | 66 | $o1 = preg_match('#^__#', $k1) === 0 ? 1 : 0; |
67 | 67 | $o2 = preg_match('#^__#', $k2) === 0 ? 1 : 0; |
68 | 68 | |
69 | - return $o1 - $o2; |
|
69 | + return $o1-$o2; |
|
70 | 70 | }); |
71 | 71 | } |
72 | 72 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $isArray = 1 === preg_match('#\[\]$#', $use); |
56 | 56 | $this->guessUse($use); |
57 | - return $this->getInternalUseName($use) . ($isArray ? '[]' : ''); |
|
57 | + return $this->getInternalUseName($use).($isArray ? '[]' : ''); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | { |
92 | 92 | $content = ''; |
93 | 93 | foreach ($this->uses as $use => $alias) { |
94 | - $content .= 'use ' . $use; |
|
95 | - $content .= !empty($alias) ? ' as ' . $alias : ''; |
|
96 | - $content .= ';' . "\n"; |
|
94 | + $content .= 'use '.$use; |
|
95 | + $content .= !empty($alias) ? ' as '.$alias : ''; |
|
96 | + $content .= ';'."\n"; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | if (!empty($content)) { |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | |
220 | 220 | $i = 1; |
221 | 221 | while ($this->hasInternalUse($uniqInternalUseName)) { |
222 | - $uniqInternalUseName = $internalUseName . ++$i; |
|
222 | + $uniqInternalUseName = $internalUseName.++$i; |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | if ($uniqInternalUseName !== $internalUseName) { |
@@ -83,7 +83,7 @@ |
||
83 | 83 | $name .= empty($word) ? '_' : $word; |
84 | 84 | } |
85 | 85 | |
86 | - return $prefix . $name . $suffix; |
|
86 | + return $prefix.$name.$suffix; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | { |
56 | 56 | $content = ''; |
57 | 57 | |
58 | - $content .= !empty($this->types) ? $this->getPhpType() . ' ' : ''; |
|
58 | + $content .= !empty($this->types) ? $this->getPhpType().' ' : ''; |
|
59 | 59 | $content .= $this->byReference ? '&' : ''; |
60 | 60 | $content .= $this->getPhpName(); |
61 | - $content .= ($this->value !== null) ? ' = ' . $this->value : ''; |
|
61 | + $content .= ($this->value !== null) ? ' = '.$this->value : ''; |
|
62 | 62 | |
63 | 63 | return $content; |
64 | 64 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function getPhpName(): string |
70 | 70 | { |
71 | - return '$' . $this->getName(); |
|
71 | + return '$'.$this->getName(); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | $lines = []; |
113 | 113 | foreach ($phpdocLines as $phpdocLine) { |
114 | - $lines[] = sprintf('%s * %s', $indent,$phpdocLine); |
|
114 | + $lines[] = sprintf('%s * %s', $indent, $phpdocLine); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | return sprintf('%1$s/**%2$s%3$s%2$s%1$s */%2$s', $indent, "\n", implode("\n", $lines)); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | foreach ($lines as $i=>$line) { |
199 | 199 | $subLinePrefix = $i === 0 ? $linePrefix : $blankSubLinePrefix; |
200 | - $lines[$i] = $subLinePrefix . $line; |
|
200 | + $lines[$i] = $subLinePrefix.$line; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | return $lines; |
@@ -213,11 +213,11 @@ discard block |
||
213 | 213 | $currentLine = ''; |
214 | 214 | |
215 | 215 | foreach (explode(' ', $line) as $word) { |
216 | - if (iconv_strlen($currentLine . ' ' . $word) > $wrapOn) { |
|
216 | + if (iconv_strlen($currentLine.' '.$word) > $wrapOn) { |
|
217 | 217 | $lines[] = $currentLine; |
218 | 218 | $currentLine = $word; |
219 | 219 | } else { |
220 | - $currentLine .= (!empty($currentLine) ? ' ' : '') . $word; |
|
220 | + $currentLine .= (!empty($currentLine) ? ' ' : '').$word; |
|
221 | 221 | } |
222 | 222 | } |
223 | 223 | $lines[] = $currentLine; |
@@ -255,11 +255,11 @@ discard block |
||
255 | 255 | */ |
256 | 256 | public function orderLines(): void |
257 | 257 | { |
258 | - uksort($this->lines, function ($k1, $k2) { |
|
258 | + uksort($this->lines, function($k1, $k2) { |
|
259 | 259 | $o1 = array_search($k1, static::LINE_TYPE_ORDER); |
260 | 260 | $o2 = array_search($k2, static::LINE_TYPE_ORDER); |
261 | 261 | |
262 | - return $o1 - $o2; |
|
262 | + return $o1-$o2; |
|
263 | 263 | }); |
264 | 264 | } |
265 | 265 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $suffix = '.\'[]\''; |
49 | 49 | } |
50 | 50 | |
51 | - return rtrim($this->returnTypes[0], '[]') . '::class' . $suffix; |
|
51 | + return rtrim($this->returnTypes[0], '[]').'::class'.$suffix; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |