Skip to content

Commit c16b74f

Browse files
uestladg
authored andcommitted
phpDocs: new line after multiline docs removed
1 parent 284fd37 commit c16b74f

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

src/PhpGenerator/ClassType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function from($from)
8888
$class->final = $from->isFinal();
8989
$class->abstract = $from->isAbstract() && $class->type === 'class';
9090
$class->implements = $from->getInterfaceNames();
91-
$class->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n"));
91+
$class->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n\t"));
9292
$namespace = $from->getNamespaceName();
9393
if ($from->getParentClass()) {
9494
$class->extends = $from->getParentClass()->getName();

src/PhpGenerator/Method.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static function from($from)
9090
$method->body = $from->isAbstract() ? FALSE : '';
9191
$method->returnReference = $from->returnsReference();
9292
$method->variadic = PHP_VERSION_ID >= 50600 && $from->isVariadic();
93-
$method->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n"));
93+
$method->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n\t"));
9494
return $method;
9595
}
9696

src/PhpGenerator/Property.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static function from(\ReflectionProperty $from)
5454
$prop->value = isset($defaults[$from->name]) ? $defaults[$from->name] : NULL;
5555
$prop->static = $from->isStatic();
5656
$prop->visibility = $from->isPrivate() ? 'private' : ($from->isProtected() ? 'protected' : 'public');
57-
$prop->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n"));
57+
$prop->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n\t"));
5858
return $prop;
5959
}
6060

tests/PhpGenerator/ClassType.from.expect

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class Class2 extends Class1 implements Interface2
3838
/**
3939
* Public
4040
* @var int
41-
*
4241
*/
4342
public $public;
4443

@@ -55,7 +54,6 @@ class Class2 extends Class1 implements Interface2
5554
/**
5655
* Func3
5756
* @return Class1
58-
*
5957
*/
6058
private function & func3(array $a%a?%, Class2 $b = NULL, Unknown $c, \Xyz\Unknown $d, $e)
6159
{

0 commit comments

Comments
 (0)