Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ITernovtsii committed Jan 5, 2017
1 parent 0228b5a commit b3d6c4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/__/arrays/randomize.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
function randomize(array $array)
{
for ($i = 0, $c = sizeof($array); $i < $c - 1; $i++) {
$j = rand($i + 1, $c - 1);
list($array[$i], $array[$j]) = array($array[$j], $array[$i]);
for ($i = 0, $c = \count($array); $i < $c - 1; $i++) {
$j = \rand($i + 1, $c - 1);
list($array[$i], $array[$j]) = [$array[$j], $array[$i]];
}

return $array;
Expand Down
2 changes: 1 addition & 1 deletion src/__/objects/isEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
*/
function isEmail($value)
{
return \filter_var($value, FILTER_VALIDATE_EMAIL) != false;
return \filter_var($value, FILTER_VALIDATE_EMAIL) !== false;
}

0 comments on commit b3d6c4e

Please sign in to comment.