Skip to content

Commit

Permalink
Add deprecation comments (CS related).
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpustulka committed Jan 8, 2018
1 parent a8c0549 commit 9ba1944
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Validation/Validation.php
Expand Up @@ -301,41 +301,47 @@ public static function comparison($check1, $operator, $check2)
switch ($operator) {
case 'isgreater':
deprecationWarning(sprintf($message, $operator, 'COMPARE_GREATER'));
// @deprecated 3.6.0 Use Validation::COMPARE_GREATER instead.
case static::COMPARE_GREATER:
if ($check1 > $check2) {
return true;
}
break;
case 'isless':
deprecationWarning(sprintf($message, $operator, 'COMPARE_LESS'));
// @deprecated 3.6.0 Use Validation::COMPARE_LESS instead.
case static::COMPARE_LESS:
if ($check1 < $check2) {
return true;
}
break;
case 'greaterorequal':
deprecationWarning(sprintf($message, $operator, 'COMPARE_GREATER_OR_EQUAL'));
// @deprecated 3.6.0 Use Validation::COMPARE_GREATER_OR_EQUAL instead.
case static::COMPARE_GREATER_OR_EQUAL:
if ($check1 >= $check2) {
return true;
}
break;
case 'lessorequal':
deprecationWarning(sprintf($message, $operator, 'COMPARE_LESS_OR_EQUAL'));
// @deprecated 3.6.0 Use Validation::COMPARE_LESS_OR_EQUAL instead.
case static::COMPARE_LESS_OR_EQUAL:
if ($check1 <= $check2) {
return true;
}
break;
case 'equalto':
deprecationWarning(sprintf($message, $operator, 'COMPARE_EQUAL'));
// @deprecated 3.6.0 Use Validation::COMPARE_EQUAL instead.
case static::COMPARE_EQUAL:
if ($check1 == $check2) {
return true;
}
break;
case 'notequal':
deprecationWarning(sprintf($message, $operator, 'COMPARE_NOT_EQUAL'));
// @deprecated 3.6.0 Use Validation::COMPARE_NOT_EQUAL instead.
case static::COMPARE_NOT_EQUAL:
if ($check1 != $check2) {
return true;
Expand Down

0 comments on commit 9ba1944

Please sign in to comment.