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...
15
/**
16
* @var Vars\Variable
17
*/
18
private $invokes;
19
20
/**
21
* @param string $mode
22
*/
23
54
public function __construct($mode, Vars\Variable $left, Vars\Variable $invokes) {
24
54
parent::__construct($mode, $left);
25
54
$this->invokes = $invokes;
26
54
}
27
28
// TODO: This seems odd. Its part of a fluid interface, right?
29
public function invoke(Functions $fun) {
30
return InvokeRule($this, $fun);
31
}
32
33
/**
34
* @return Vars\Variable
35
*/
36
12
public function invokes() {
37
12
return $this->invokes;
38
}
39
40
/**
41
* @inheritdoc
42
*/
43
public function explain($text) {
44
$r = new InvokeRule($this->mode(), $this->subject(), $this->invokes);
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.