This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
26
{
27
/**
28
* @var FlowInterface
29
*/
30
private $flow;
31
32
/**
33
* Each constructor.
34
*
35
* @param FlowInterface $flow
36
*/
37
11
public function __construct(FlowInterface $flow)
38
{
39
11
$this->flow = $flow;
40
11
}
41
42
/**
43
* @param NodeInterface $node
44
*
45
* @return NodeCollectionInterface
46
*/
47
10
public function flow(NodeInterface $node)
48
{
49
10
if (!($node instanceof NodeCollectionInterface)) {
50
1
throw new InvalidArgumentException("The supplied $node is not a NodeCollectionInterface");
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.