mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-03 12:17:48 +08:00
Update ValidatesAttributes.php
This commit is contained in:
parent
038a4fe551
commit
0983e9ffa6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user