@@ -78,6 +78,6 @@ |
||
78 | 78 | */ |
79 | 79 | public function __toString() |
80 | 80 | { |
81 | - return $this->refers . ' ' . $this->description->render(); |
|
81 | + return $this->refers.' '.$this->description->render(); |
|
82 | 82 | } |
83 | 83 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | */ |
74 | 74 | public function __toString() |
75 | 75 | { |
76 | - return $this->authorName . (strlen($this->authorEmail) ? ' <' . $this->authorEmail . '>' : ''); |
|
76 | + return $this->authorName.(strlen($this->authorEmail) ? ' <'.$this->authorEmail.'>' : ''); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -96,7 +96,7 @@ |
||
96 | 96 | |
97 | 97 | $tags = []; |
98 | 98 | foreach ($this->tags as $tag) { |
99 | - $tags[] = '{' . $formatter->format($tag) . '}'; |
|
99 | + $tags[] = '{'.$formatter->format($tag).'}'; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | return vsprintf($this->bodyTemplate, $tags); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | $comment = $this->addTagBlock($docblock, $wrapLength, $indent, $comment); |
91 | - $comment .= $indent . ' */'; |
|
91 | + $comment .= $indent.' */'; |
|
92 | 92 | |
93 | 93 | return $comment; |
94 | 94 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLength) |
122 | 122 | { |
123 | - $text = $docblock->getSummary() . ((string)$docblock->getDescription() ? "\n\n" . $docblock->getDescription() |
|
123 | + $text = $docblock->getSummary().((string) $docblock->getDescription() ? "\n\n".$docblock->getDescription() |
|
124 | 124 | : ''); |
125 | 125 | if ($wrapLength !== null) { |
126 | 126 | $text = wordwrap($text, $wrapLength); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | private function getExamplePathFromExampleDirectory($file) |
137 | 137 | { |
138 | - return getcwd() . DIRECTORY_SEPARATOR . 'examples' . DIRECTORY_SEPARATOR . $file; |
|
138 | + return getcwd().DIRECTORY_SEPARATOR.'examples'.DIRECTORY_SEPARATOR.$file; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | */ |
149 | 149 | private function constructExamplePath($directory, $file) |
150 | 150 | { |
151 | - return rtrim($directory, '\\/') . DIRECTORY_SEPARATOR . $file; |
|
151 | + return rtrim($directory, '\\/').DIRECTORY_SEPARATOR.$file; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | /** |
@@ -124,7 +124,7 @@ |
||
124 | 124 | |
125 | 125 | for ($i = 1; $i < $count; $i += 2) { |
126 | 126 | $tags[] = $this->tagFactory->create($tokens[$i], $context); |
127 | - $tokens[$i] = '%' . ++$tagCount . '$s'; |
|
127 | + $tokens[$i] = '%'.++$tagCount.'$s'; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | //In order to allow "literal" inline tags, the otherwise invalid |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function create($tagLine, TypeContext $context = null) |
109 | 109 | { |
110 | - if (! $context) { |
|
110 | + if (!$context) { |
|
111 | 111 | $context = new TypeContext(''); |
112 | 112 | } |
113 | 113 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | if ($tagBody !== '' && $tagBody[0] === '[') { |
117 | 117 | throw new \InvalidArgumentException( |
118 | - 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors' |
|
118 | + 'The tag "'.$tagLine.'" does not seem to be wellformed, please check it for errors' |
|
119 | 119 | ); |
120 | 120 | } |
121 | 121 | |
@@ -167,9 +167,9 @@ discard block |
||
167 | 167 | private function extractTagParts($tagLine) |
168 | 168 | { |
169 | 169 | $matches = []; |
170 | - if (! preg_match('/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)/us', $tagLine, $matches)) { |
|
170 | + if (!preg_match('/^@('.self::REGEX_TAGNAME.')(?:\s*([^\s].*)|$)/us', $tagLine, $matches)) { |
|
171 | 171 | throw new \InvalidArgumentException( |
172 | - 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors' |
|
172 | + 'The tag "'.$tagLine.'" does not seem to be wellformed, please check it for errors' |
|
173 | 173 | ); |
174 | 174 | } |
175 | 175 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | */ |
267 | 267 | private function fetchParametersForHandlerFactoryMethod($handlerClassName) |
268 | 268 | { |
269 | - if (! isset($this->tagHandlerParameterCache[$handlerClassName])) { |
|
269 | + if (!isset($this->tagHandlerParameterCache[$handlerClassName])) { |
|
270 | 270 | $methodReflection = new \ReflectionMethod($handlerClassName, 'create'); |
271 | 271 | $this->tagHandlerParameterCache[$handlerClassName] = $methodReflection->getParameters(); |
272 | 272 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | return new DocBlock( |
94 | 94 | $summary, |
95 | 95 | $description ? $this->descriptionFactory->create($description, $context) : null, |
96 | - array_filter($this->parseTagBlock($tags, $context), function ($tag) { |
|
96 | + array_filter($this->parseTagBlock($tags, $context), function($tag) { |
|
97 | 97 | return $tag instanceof Tag; |
98 | 98 | }), |
99 | 99 | $context, |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | if (isset($tag_line[0]) && ($tag_line[0] === '@')) { |
247 | 247 | $result[] = $tag_line; |
248 | 248 | } else { |
249 | - $result[count($result) - 1] .= "\n" . $tag_line; |
|
249 | + $result[count($result) - 1] .= "\n".$tag_line; |
|
250 | 250 | } |
251 | 251 | } |
252 | 252 | |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | // @codeCoverageIgnoreStart |
269 | 269 | // Can't simulate this; this only happens if there is an error with the parsing of the DocBlock that |
270 | 270 | // we didn't foresee. |
271 | - throw new \LogicException('A tag block started with text instead of an at-sign(@): ' . $tags); |
|
271 | + throw new \LogicException('A tag block started with text instead of an at-sign(@): '.$tags); |
|
272 | 272 | // @codeCoverageIgnoreEnd |
273 | 273 | } |
274 | 274 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function insert($name, $value, $priority = 0) |
64 | 64 | { |
65 | - if (! isset($this->items[$name])) { |
|
65 | + if (!isset($this->items[$name])) { |
|
66 | 66 | $this->count++; |
67 | 67 | } |
68 | 68 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function setPriority($name, $priority) |
87 | 87 | { |
88 | - if (! isset($this->items[$name])) { |
|
88 | + if (!isset($this->items[$name])) { |
|
89 | 89 | throw new \Exception("item $name not found"); |
90 | 90 | } |
91 | 91 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function get($name) |
133 | 133 | { |
134 | - if (! isset($this->items[$name])) { |
|
134 | + if (!isset($this->items[$name])) { |
|
135 | 135 | return; |
136 | 136 | } |
137 | 137 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | protected function sort() |
147 | 147 | { |
148 | - if (! $this->sorted) { |
|
148 | + if (!$this->sorted) { |
|
149 | 149 | uasort($this->items, [$this, 'compare']); |
150 | 150 | $this->sorted = true; |
151 | 151 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | return array_map( |
268 | - function ($item) use ($flag) { |
|
268 | + function($item) use ($flag) { |
|
269 | 269 | return ($flag == PriorityList::EXTR_PRIORITY) ? $item['priority'] : $item['data']; |
270 | 270 | }, |
271 | 271 | $this->items |