@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | |
107 | 107 | $format = ''; |
108 | 108 | if (preg_match('#^\?#', $methodParameterGenerator->getPhpTypeFromTypes())) { |
109 | - $format .= 'if (null === $this->%2$s) {' . "\n"; |
|
110 | - $format .= '%4$sreturn false;' . "\n"; |
|
111 | - $format .= '}' . "\n\n"; |
|
109 | + $format .= 'if (null === $this->%2$s) {'."\n"; |
|
110 | + $format .= '%4$sreturn false;'."\n"; |
|
111 | + $format .= '}'."\n\n"; |
|
112 | 112 | } |
113 | 113 | $format .= 'return in_array($%1$s, $this->%2$s, %3$s);'; |
114 | 114 | |
@@ -141,13 +141,13 @@ discard block |
||
141 | 141 | ); |
142 | 142 | $this->addSetterMethod->addParameter($methodParameterGenerator); |
143 | 143 | |
144 | - $format = 'if ($this->%1$s(%2$s)) {' . "\n"; |
|
145 | - $format .= '%3$sreturn;' . "\n"; |
|
146 | - $format .= '}' . "\n\n"; |
|
144 | + $format = 'if ($this->%1$s(%2$s)) {'."\n"; |
|
145 | + $format .= '%3$sreturn;'."\n"; |
|
146 | + $format .= '}'."\n\n"; |
|
147 | 147 | if (preg_match('#^\?#', $methodParameterGenerator->getPhpTypeFromTypes())) { |
148 | - $format .= 'if (null === $this->%4$s) {' . "\n"; |
|
149 | - $format .= '%3$s$this->%4$s = [];' . "\n"; |
|
150 | - $format .= '}' . "\n\n"; |
|
148 | + $format .= 'if (null === $this->%4$s) {'."\n"; |
|
149 | + $format .= '%3$s$this->%4$s = [];'."\n"; |
|
150 | + $format .= '}'."\n\n"; |
|
151 | 151 | } |
152 | 152 | $format .= '$this->%4$s[] = %2$s;'; |
153 | 153 | |
@@ -180,9 +180,9 @@ discard block |
||
180 | 180 | |
181 | 181 | $this->removeSetterMethod->addParameter($methodParameterGenerator); |
182 | 182 | |
183 | - $format = 'if ($this->%1$s(%2$s)) {' . "\n"; |
|
184 | - $format .= '%3$s$index = array_search(%2$s, $this->%4$s);' . "\n"; |
|
185 | - $format .= '%3$sunset($this->%4$s[$index]);' . "\n"; |
|
183 | + $format = 'if ($this->%1$s(%2$s)) {'."\n"; |
|
184 | + $format .= '%3$s$index = array_search(%2$s, $this->%4$s);'."\n"; |
|
185 | + $format .= '%3$sunset($this->%4$s[$index]);'."\n"; |
|
186 | 186 | $format .= '}'; |
187 | 187 | |
188 | 188 | $this->removeSetterMethod->addLine( |
@@ -24,10 +24,10 @@ |
||
24 | 24 | |
25 | 25 | $content = ''; |
26 | 26 | |
27 | - $content .= !empty($this->generator->getTypes()) ? $this->generator->getPhpTypeFromTypes() . ' ' : ''; |
|
27 | + $content .= !empty($this->generator->getTypes()) ? $this->generator->getPhpTypeFromTypes().' ' : ''; |
|
28 | 28 | $content .= $this->generator->isByReference() ? '&' : ''; |
29 | 29 | $content .= $this->generator->getPhpName(); |
30 | - $content .= ($this->generator->getValue() !== null) ? ' = ' . $this->generator->getValue() : ''; |
|
30 | + $content .= ($this->generator->getValue() !== null) ? ' = '.$this->generator->getValue() : ''; |
|
31 | 31 | |
32 | 32 | return $content; |
33 | 33 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $content = ''; |
46 | 46 | foreach ($this->generator->getLines() as $line) { |
47 | 47 | foreach (explode("\n", $line) as $innerLine) { |
48 | - $content .= $indent.$indent.$innerLine. "\n"; |
|
48 | + $content .= $indent.$indent.$innerLine."\n"; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | return $content; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $methodParameters = $this->buildMethodParameters($indent, '%1$s'); |
63 | 63 | // 3 = length of $formatVar - 1 (see line just below) |
64 | 64 | // -1 because the first parameter don't have $formatVar |
65 | - $methodParametersLength = strlen($methodParameters) - 3*(count($this->generator->getParameters())-1); |
|
65 | + $methodParametersLength = strlen($methodParameters)-3 * (count($this->generator->getParameters())-1); |
|
66 | 66 | $parametersFutureFormat = '%s%s%s'; |
67 | 67 | $content = sprintf('%s%s%s function %s(%s)%s', |
68 | 68 | $indent, |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $parametersStart = ''; |
77 | 77 | $additionalIndentation = ' '; |
78 | 78 | $parametersEnd = ''; |
79 | - $contentLength = strlen($content) - strlen($parametersFutureFormat) + $methodParametersLength; |
|
79 | + $contentLength = strlen($content)-strlen($parametersFutureFormat)+$methodParametersLength; |
|
80 | 80 | if ($contentLength > $this->generator->getPhpDocGenerator()->getWrapOn()) { |
81 | 81 | // Make parameters go into multiline formation |
82 | 82 | $additionalIndentation = "\n".$indent.$indent; |
@@ -118,6 +118,6 @@ discard block |
||
118 | 118 | return ''; |
119 | 119 | } |
120 | 120 | |
121 | - return sprintf (': %s', $this->generator->getPhpTypeFromReturnTypes()); |
|
121 | + return sprintf(': %s', $this->generator->getPhpTypeFromReturnTypes()); |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | \ No newline at end of file |