@@ -12,6 +12,9 @@ discard block |
||
12 | 12 | { |
13 | 13 | abstract public function matches($object); |
14 | 14 | |
15 | + /** |
|
16 | + * @param \phpDocumentor\Reflection\File\LocalFile $object |
|
17 | + */ |
|
15 | 18 | public function create($object, StrategyContainer $strategies, Context $context = null) |
16 | 19 | { |
17 | 20 | if (! $this->matches($object)) { |
@@ -42,7 +45,7 @@ discard block |
||
42 | 45 | * @param Doc $docBlock |
43 | 46 | * @param StrategyContainer $strategies |
44 | 47 | * @param Context $context |
45 | - * @return null|\phpDocumentor\Reflection\DocBlock |
|
48 | + * @return null|Element |
|
46 | 49 | */ |
47 | 50 | protected function createDocBlock(Doc $docBlock = null, StrategyContainer $strategies, Context $context = null) |
48 | 51 | { |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function create($object, StrategyContainer $strategies, Context $context = null) |
16 | 16 | { |
17 | - if (! $this->matches($object)) { |
|
17 | + if (!$this->matches($object)) { |
|
18 | 18 | throw new \InvalidArgumentException( |
19 | 19 | sprintf('%s cannot handle objects with the type %s', |
20 | 20 | __CLASS__, |
@@ -13,19 +13,16 @@ |
||
13 | 13 | |
14 | 14 | namespace phpDocumentor\Reflection\Php\Factory; |
15 | 15 | |
16 | -use InvalidArgumentException; |
|
17 | 16 | use phpDocumentor\Reflection\Element; |
18 | 17 | use phpDocumentor\Reflection\Fqsen; |
19 | 18 | use phpDocumentor\Reflection\Php\Class_ as ClassElement; |
20 | 19 | use phpDocumentor\Reflection\Php\ProjectFactoryStrategy; |
21 | 20 | use phpDocumentor\Reflection\Php\StrategyContainer; |
22 | 21 | use phpDocumentor\Reflection\Types\Context; |
23 | -use PhpParser\Node; |
|
24 | 22 | use PhpParser\Node\Stmt\Class_ as ClassNode; |
25 | 23 | use PhpParser\Node\Stmt\ClassConst; |
26 | 24 | use PhpParser\Node\Stmt\ClassMethod; |
27 | 25 | use PhpParser\Node\Stmt\Property as PropertyNode; |
28 | -use PhpParser\Comment\Doc; |
|
29 | 26 | use PhpParser\Node\Stmt\TraitUse; |
30 | 27 | |
31 | 28 | /** |
@@ -13,7 +13,6 @@ discard block |
||
13 | 13 | |
14 | 14 | namespace phpDocumentor\Reflection\Php\Factory; |
15 | 15 | |
16 | -use InvalidArgumentException; |
|
17 | 16 | use phpDocumentor\Reflection\File as FileSystemFile; |
18 | 17 | use phpDocumentor\Reflection\Fqsen; |
19 | 18 | use phpDocumentor\Reflection\Middleware\ChainFactory; |
@@ -25,8 +24,6 @@ discard block |
||
25 | 24 | use phpDocumentor\Reflection\Php\StrategyContainer; |
26 | 25 | use phpDocumentor\Reflection\Types\Context; |
27 | 26 | use phpDocumentor\Reflection\Types\ContextFactory; |
28 | -use PhpParser\Comment\Doc; |
|
29 | -use PhpParser\Lexer; |
|
30 | 27 | use PhpParser\Node; |
31 | 28 | use PhpParser\Node\Stmt\Class_ as ClassNode; |
32 | 29 | use PhpParser\Node\Stmt\Function_ as FunctionNode; |
@@ -12,13 +12,11 @@ |
||
12 | 12 | |
13 | 13 | namespace phpDocumentor\Reflection\Php\Factory; |
14 | 14 | |
15 | -use InvalidArgumentException; |
|
16 | 15 | use phpDocumentor\Reflection\Php\Method as MethodDescriptor; |
17 | 16 | use phpDocumentor\Reflection\Php\ProjectFactoryStrategy; |
18 | 17 | use phpDocumentor\Reflection\Php\StrategyContainer; |
19 | 18 | use phpDocumentor\Reflection\Php\Visibility; |
20 | 19 | use phpDocumentor\Reflection\Types\Context; |
21 | -use PhpParser\Comment\Doc; |
|
22 | 20 | use PhpParser\Node\Stmt\ClassMethod; |
23 | 21 | |
24 | 22 | /** |