mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Add default types to method tag arguments
This commit is contained in:
@@ -18,6 +18,7 @@ use phpDocumentor\Reflection\DocBlock\Tags\Method;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\MethodParameter;
|
||||
use phpDocumentor\Reflection\Types\Context;
|
||||
use phpDocumentor\Reflection\Types\Integer;
|
||||
use phpDocumentor\Reflection\Types\Mixed_;
|
||||
use phpDocumentor\Reflection\Types\String_;
|
||||
use phpDocumentor\Reflection\Types\Void_;
|
||||
|
||||
@@ -82,6 +83,30 @@ final class MethodFactoryTest extends TagFactoryTestCase
|
||||
[]
|
||||
),
|
||||
],
|
||||
[
|
||||
'@method myMethod($a)',
|
||||
new Method(
|
||||
'myMethod',
|
||||
[],
|
||||
new Void_(),
|
||||
false,
|
||||
new Description(''),
|
||||
false,
|
||||
[new MethodParameter('a', new Mixed_())]
|
||||
),
|
||||
],
|
||||
[
|
||||
'@method myMethod($a = 1)',
|
||||
new Method(
|
||||
'myMethod',
|
||||
[],
|
||||
new Void_(),
|
||||
false,
|
||||
new Description(''),
|
||||
false,
|
||||
[new MethodParameter('a', new Mixed_(), false, false, '1')]
|
||||
),
|
||||
],
|
||||
[
|
||||
'@method myMethod(int $a = 1)',
|
||||
new Method(
|
||||
|
||||
Reference in New Issue
Block a user