File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -151,16 +151,20 @@ In your PHP CS Fixer configuration register fixers and use them:
151151- * @param $bar
152152+ * @param mixed $bar
153153 */
154+ function a($foo, $bar) {}
154155
155156```
156157
157158- ** PhpdocSingleLineVarFixer** - ` @var ` annotation must be in single line when is the only content.
158159``` diff
159160 <?php
160- - /**
161- - * @var Foo
162- - */
163- + /** @var Foo */
161+ class Foo {
162+ - /**
163+ - * @var string
164+ - */
165+ + /** @var string */
166+ private $name;
167+ }
164168
165169```
166170
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public function getDefinition() : FixerDefinition
2020 * @param string $foo
2121 * @param $bar
2222 */
23+ function a($foo, $bar) {}
2324 ' )]
2425 );
2526 }
Original file line number Diff line number Diff line change @@ -16,9 +16,12 @@ public function getDefinition() : FixerDefinition
1616 return new FixerDefinition (
1717 '`@var` annotation must be in single line when is the only content. ' ,
1818 [new CodeSample ('<?php
19- /**
20- * @var Foo
21- */
19+ class Foo {
20+ /**
21+ * @var string
22+ */
23+ private $name;
24+ }
2225 ' )]
2326 );
2427 }
You can’t perform that action at this time.
0 commit comments