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...
8
{
9
/** @var string operator */
10
const operator = '>';
11
12
/** @var scalar $minimum */
13
protected $minimum;
14
15
/**
16
* @param string $field The field to apply the rule on.
17
* @param array $value The value the field can above to.
Should the return type not be integer|double|string|boolean?
This check compares the return type specified in the @return annotation of a function
or method doc comment with the types returned by the function and raises an issue if they
mismatch.
The method JClaveau\LogicalFilter\R...AboveRule::getMinimum() has been deprecated with message: getLowerLimit
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be
removed from the class and what other method or class to use instead.
Loading history...
57
}
58
59
/**
60
* Checks if the rule do not expect the value to be above infinity.
61
*
62
* @return bool
63
*/
64
42
public function hasSolution(array $simplification_options=[])
65
{
66
// if minimum is null, the rule is equivalent to true
67
42
if (is_numeric( $this->minimum )) {
68
30
if (is_nan( $this->minimum )) {
69
2
return false;
70
}
71
72
30
if (is_infinite( $this->minimum ) && $this->minimum > 0) {
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.