Skip to content

Commit d953c92

Browse files
uestladg
authored andcommitted
phpDocs: new line after multiline docs removed
1 parent 1120486 commit d953c92

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
@@ -101,7 +101,7 @@ public static function from($from)
101101
$class->final = $from->isFinal();
102102
$class->abstract = $from->isAbstract() && $class->type === 'class';
103103
$class->implements = $from->getInterfaceNames();
104-
$class->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n"));
104+
$class->documents = preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n\t"));
105105
$namespace = $from->getNamespaceName();
106106
if ($from->getParentClass()) {
107107
$class->extends = $from->getParentClass()->getName();

src/PhpGenerator/Method.php

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

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)