Skip to content

Commit

Permalink
cast consistancy (#20881)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored and taylorotwell committed Aug 31, 2017
1 parent e7b0e54 commit a3cdf51
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Schema/Grammars/Grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ protected function getDefaultValue($value)

return is_bool($value)
? "'".(int) $value."'"
: "'".strval($value)."'";
: "'".(string) $value."'";
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Concerns/ValidatesAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ protected function prepareUniqueId($id)
}

if (filter_var($id, FILTER_VALIDATE_INT) !== false) {
$id = intval($id);
$id = (int) $id;
}

return $id;
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/ValidationRuleParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected function prepareRule($rule)
return $rule;
}

return strval($rule);
return (string) $rule;
}

/**
Expand Down

0 comments on commit a3cdf51

Please sign in to comment.