Update ValidatesAttributes.php

This commit is contained in:
李铭昕 2019-08-31 20:22:34 +08:00
parent 038a4fe551
commit 0983e9ffa6

View File

@ -1179,8 +1179,9 @@ trait ValidatesAttributes
* Get the date timestamp.
*
* @param mixed $value
* @return bool|int
*/
protected function getDateTimestamp($value): int
protected function getDateTimestamp($value)
{
if ($value instanceof DateTimeInterface) {
return $value->getTimestamp();
@ -1524,7 +1525,7 @@ trait ValidatesAttributes
/**
* Parse named parameters to $key => $value items.
*/
protected function parseNamedParameters(array $parameters): array
protected function parseNamedParameters(array $parameters): ?array
{
return array_reduce($parameters, function ($result, $item) {
[$key, $value] = array_pad(explode('=', $item, 2), 2, null);