Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a915b3

Browse filesBrowse files
Improve PHPDoc return type for Eloquent's getOriginal methods with conditional typing (#55779)
1 parent ccf320a commit 5a915b3
Copy full SHA for 5a915b3

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php

Copy file name to clipboardExpand all lines: src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,7 @@ public function setRawAttributes(array $attributes, $sync = false)
19601960
*
19611961
* @param string|null $key
19621962
* @param mixed $default
1963-
* @return mixed|array
1963+
* @return ($key is null ? array<string, mixed> : mixed)
19641964
*/
19651965
public function getOriginal($key = null, $default = null)
19661966
{
@@ -1974,7 +1974,7 @@ public function getOriginal($key = null, $default = null)
19741974
*
19751975
* @param string|null $key
19761976
* @param mixed $default
1977-
* @return mixed|array
1977+
* @return ($key is null ? array<string, mixed> : mixed)
19781978
*/
19791979
protected function getOriginalWithoutRewindingModel($key = null, $default = null)
19801980
{
@@ -1994,7 +1994,7 @@ protected function getOriginalWithoutRewindingModel($key = null, $default = null
19941994
*
19951995
* @param string|null $key
19961996
* @param mixed $default
1997-
* @return mixed|array
1997+
* @return ($key is null ? array<string, mixed> : mixed)
19981998
*/
19991999
public function getRawOriginal($key = null, $default = null)
20002000
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.