Skip to content

Commit

Permalink
Duplicate conditional expression in Validations.php (#545)
Browse files Browse the repository at this point in the history
`!is_string($options['with'])` is repeated.
  • Loading branch information
kilida authored and koenpunt committed Jun 22, 2016
1 parent 891ff0d commit f56c77e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Validations.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public function validates_format_of($attrs)
$attribute = $options[0];
$var = $this->model->$attribute;

if (is_null($options['with']) || !is_string($options['with']) || !is_string($options['with']))
if (is_null($options['with']) || !is_string($options['with']))
throw new ValidationsArgumentError('A regular expression must be supplied as the [with] option of the configuration array.');
else
$expression = $options['with'];
Expand Down

0 comments on commit f56c77e

Please sign in to comment.