This code seems to be duplicated across 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...
23
1
throw new \InvalidArgumentException("Invalid regexp: '%regexp'");
24
}
25
48
$this->regexp = $regexp;
26
48
}
27
28
public function invoke(Functions $fun) {
29
return InvokeRule($this, $fun);
30
}
31
32
/**
33
* @return string
34
*/
35
11
public function regexp() {
36
11
return $this->regexp;
37
}
38
39
/**
40
* @inheritdoc
41
*/
42
public function explain($text) {
43
$r = new ContainTextRule($this->mode(), $this->subject(), $this->regexp);
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.