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...
24
{
25
use InvokeTrait;
26
27
/**
28
* @var FileNodeInterface
29
*/
30
private $file;
31
32
/**
33
* @param FileNodeInterface $file
34
* @param array $options
35
*/
36
4
public function __construct(
37
FileNodeInterface $file,
38
array $options = []
39
) {
40
4
$this->file = $file;
41
4
$this->options = $options;
42
4
}
43
44
/**
45
* Add files from a local Directory
46
*
47
* @param NodeInterface $node
48
*
49
* @return FileNodeInterface
50
*/
51
4
public function flow(NodeInterface $node)
52
{
53
4
if (!($node instanceof FileNodeCollectionInterface)) {
54
1
throw new \InvalidArgumentException("The supplied $node is not a FileNodeCollectionInterface");
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.