Skip to content

Commit 89ab71e

Browse files
committed
only have matches() docblock once, on the parent;
1 parent 40c5b05 commit 89ab71e

File tree

11 files changed

+5
-63
lines changed

11 files changed

+5
-63
lines changed

src/phpDocumentor/Reflection/Php/Factory/AbstractFactory.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
namespace phpDocumentor\Reflection\Php\Factory;
55

66
use phpDocumentor\Reflection\DocBlock as DocBlockInstance;
7-
use phpDocumentor\Reflection\Element;
87
use phpDocumentor\Reflection\Php\ProjectFactoryStrategy;
98
use phpDocumentor\Reflection\Php\StrategyContainer;
109
use phpDocumentor\Reflection\Types\Context;
@@ -13,6 +12,11 @@
1312

1413
abstract class AbstractFactory implements ProjectFactoryStrategy
1514
{
15+
/**
16+
* Returns true when the strategy is able to handle the object.
17+
*
18+
* @param mixed $object object to check.
19+
*/
1620
abstract public function matches($object): bool;
1721

1822
final public function create($object, StrategyContainer $strategies, ?Context $context = null)

src/phpDocumentor/Reflection/Php/Factory/Argument.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ public function __construct(PrettyPrinter $prettyPrinter)
4242
$this->valueConverter = $prettyPrinter;
4343
}
4444

45-
/**
46-
* Returns true when the strategy is able to handle the object.
47-
*
48-
*
49-
* @param mixed $object object to check.
50-
*/
5145
public function matches($object): bool
5246
{
5347
return $object instanceof Param;

src/phpDocumentor/Reflection/Php/Factory/Class_.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
namespace phpDocumentor\Reflection\Php\Factory;
1616

17-
use phpDocumentor\Reflection\Element;
1817
use phpDocumentor\Reflection\Fqsen;
1918
use phpDocumentor\Reflection\Location;
2019
use phpDocumentor\Reflection\Php\Class_ as ClassElement;
@@ -34,12 +33,6 @@
3433
final class Class_ extends AbstractFactory implements ProjectFactoryStrategy
3534
// @codingStandardsIgnoreEnd
3635
{
37-
/**
38-
* Returns true when the strategy is able to handle the object.
39-
*
40-
*
41-
* @param mixed $object object to check.
42-
*/
4336
public function matches($object): bool
4437
{
4538
return $object instanceof ClassNode;

src/phpDocumentor/Reflection/Php/Factory/Constant.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ public function __construct(PrettyPrinter $prettyPrinter)
4141
$this->valueConverter = $prettyPrinter;
4242
}
4343

44-
/**
45-
* Returns true when the strategy is able to handle the object.
46-
*
47-
*
48-
* @param mixed $object object to check.
49-
*/
5044
public function matches($object): bool
5145
{
5246
return $object instanceof ClassConstantIterator;

src/phpDocumentor/Reflection/Php/Factory/DocBlock.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ public function __construct(DocBlockFactoryInterface $docBlockFactory)
4444
$this->docblockFactory = $docBlockFactory;
4545
}
4646

47-
/**
48-
* Returns true when the strategy is able to handle the object.
49-
*
50-
*
51-
* @param mixed $object object to check.
52-
*/
5347
public function matches($object): bool
5448
{
5549
return $object instanceof Doc;

src/phpDocumentor/Reflection/Php/Factory/File.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ public function __construct(NodesFactory $nodesFactory, $middleware = [])
6565
$this->middlewareChain = ChainFactory::createExecutionChain($middleware, $lastCallable);
6666
}
6767

68-
/**
69-
* Returns true when the strategy is able to handle the object.
70-
*
71-
*
72-
* @param mixed $file path to check.
73-
*/
7468
public function matches($file): bool
7569
{
7670
return $file instanceof FileSystemFile;

src/phpDocumentor/Reflection/Php/Factory/Function_.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@
3333
final class Function_ extends AbstractFactory implements ProjectFactoryStrategy
3434
// @codingStandardsIgnoreEnd
3535
{
36-
/**
37-
* Returns true when the strategy is able to handle the object.
38-
*
39-
*
40-
* @param mixed $object object to check.
41-
*/
4236
public function matches($object): bool
4337
{
4438
return $object instanceof FunctionNode;

src/phpDocumentor/Reflection/Php/Factory/Interface_.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
namespace phpDocumentor\Reflection\Php\Factory;
1616

17-
use phpDocumentor\Reflection\Element;
1817
use phpDocumentor\Reflection\Fqsen;
1918
use phpDocumentor\Reflection\Location;
2019
use phpDocumentor\Reflection\Php\Interface_ as InterfaceElement;
@@ -32,12 +31,6 @@
3231
final class Interface_ extends AbstractFactory implements ProjectFactoryStrategy
3332
// @codingStandardsIgnoreEnd
3433
{
35-
/**
36-
* Returns true when the strategy is able to handle the object.
37-
*
38-
*
39-
* @param mixed $object object to check.
40-
*/
4134
public function matches($object): bool
4235
{
4336
return $object instanceof InterfaceNode;

src/phpDocumentor/Reflection/Php/Factory/Method.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
*/
3030
final class Method extends AbstractFactory implements ProjectFactoryStrategy
3131
{
32-
/**
33-
* Returns true when the strategy is able to handle the object.
34-
*
35-
*
36-
* @param mixed $object object to check.
37-
*/
3832
public function matches($object): bool
3933
{
4034
return $object instanceof ClassMethod;

src/phpDocumentor/Reflection/Php/Factory/Property.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ public function __construct(PrettyPrinter $prettyPrinter)
4343
$this->valueConverter = $prettyPrinter;
4444
}
4545

46-
/**
47-
* Returns true when the strategy is able to handle the object.
48-
*
49-
*
50-
* @param mixed $object object to check.
51-
*/
5246
public function matches($object): bool
5347
{
5448
return $object instanceof PropertyIterator;

src/phpDocumentor/Reflection/Php/Factory/Trait_.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
final class Trait_ extends AbstractFactory implements ProjectFactoryStrategy
3030
// @codingStandardsIgnoreEnd
3131
{
32-
/**
33-
* Returns true when the strategy is able to handle the object.
34-
*
35-
*
36-
* @param mixed $object object to check.
37-
*/
3832
public function matches($object): bool
3933
{
4034
return $object instanceof TraitNode;

0 commit comments

Comments
 (0)