It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
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...
19
{
20
/**
21
* A constant for an error message if the value is not less than the max.
22
*/
23
const NOT_LESS_THAN = 'LessThan::NOT_LESS_THAN';
24
25
/**
26
* The message templates which can be returned by this validator.
27
*
28
* @var array
29
*/
30
protected $messageTemplates = [
31
self::NOT_LESS_THAN => '{{ name }} must be less than {{ max }}',
32
];
33
34
/**
35
* The upper boundary.
36
*
37
* @var int
38
*/
39
protected $max;
40
41
/**
42
* Construct the LessThan rule.
43
*
44
* @param int $max
45
*/
46
3
public function __construct($max)
47
{
48
3
$this->max = $max;
49
3
}
50
51
/**
52
* Checks whether or not $value is less than the max for this rule.
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.