mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 10:07:12 +00:00
UPDATE Method.php, MethodTest.php
- try to make the if-condition php 7.2.0-compatible - correct docBlock for the test method
This commit is contained in:
committed by
Jaap van Otterdijk
parent
e9454d844d
commit
a41a31f8c8
@@ -128,7 +128,7 @@ final class Method extends BaseTag implements Factory\StaticMethod
|
||||
$returnType = $typeResolver->resolve($returnType, $context);
|
||||
$description = $descriptionFactory->create($description, $context);
|
||||
|
||||
if ('' !== $arguments) {
|
||||
if (is_string($arguments) && strlen($arguments) > 0) {
|
||||
$arguments = explode(',', $arguments);
|
||||
foreach($arguments as &$argument) {
|
||||
$argument = explode(' ', self::stripRestArg(trim($argument)), 2);
|
||||
|
||||
@@ -277,6 +277,13 @@ class MethodTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($description, $fixture->getDescription());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::create
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Tags\Method::<public>
|
||||
* @uses \phpDocumentor\Reflection\TypeResolver
|
||||
* @uses \phpDocumentor\Reflection\DocBlock\Description
|
||||
* @uses \phpDocumentor\Reflection\Types\Context
|
||||
*/
|
||||
public function testReturnTypeThis()
|
||||
{
|
||||
$descriptionFactory = m::mock(DescriptionFactory::class);
|
||||
|
||||
Reference in New Issue
Block a user