Skip to content

Commit

Permalink
possibly reduced complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
philiplb committed Apr 3, 2016
1 parent 9304676 commit 8a6d544
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Valdi/Validator/Contains.php
Expand Up @@ -39,9 +39,7 @@ public function isValid($value, array $parameters) {

$this->validateParameterCount($parameterAmount);

$caseInsensitive = $parameterAmount == 1 || $parameterAmount > 1 && $parameters[1];

if ($caseInsensitive) {
if ($parameterAmount == 1 || $parameterAmount > 1 && $parameters[1]) {
$parameters[0] = strtolower($parameters[0]);
$value = strtolower($value);
}
Expand Down

0 comments on commit 8a6d544

Please sign in to comment.