Skip to content

Commit 6b5f87d

Browse files
refactor: add |null in docblock (#57253)
* refactor: add |null in docblock * Update ValidatesAttributes.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent e779bc5 commit 6b5f87d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Validation/Concerns/ValidatesAttributes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,13 @@ protected function getDateFormat($attribute)
277277
* Get the date timestamp.
278278
*
279279
* @param mixed $value
280-
* @return int
280+
* @return int|null
281281
*/
282282
protected function getDateTimestamp($value)
283283
{
284284
$date = is_null($value) ? null : $this->getDateTime($value);
285285

286-
return $date ? $date->getTimestamp() : null;
286+
return $date?->getTimestamp();
287287
}
288288

289289
/**

0 commit comments

Comments
 (0)