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...
22
{
23
/**
24
* @var WorkerTranslationBlock
25
*/
26
private $worker;
27
28
public function __construct()
29
{
30
$this->worker = new WorkerTranslationBlock();
31
}
32
33
public function enterNode(Twig_Node $node, Twig_Environment $env)
34
{
35
return $this->worker->work($node, $this->collection, function () {
The expression $this->worker->work($nod...AbsoluteFilePath(); }); of type Twig_Node|Twig_NodeInterface adds the type Twig_NodeInterface to the return on line 35 which is incompatible with the return type declared by the interface Twig_NodeVisitorInterface::enterNode of type Twig_Node.
Loading history...
36
return $this->getAbsoluteFilePath();
37
});
38
}
39
40
public function leaveNode(Twig_Node $node, Twig_Environment $env)
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.