Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Tweak return type for missing config #47702

Merged
merged 1 commit into from
Jul 10, 2023
Merged

Conversation

sfreytag
Copy link
Contributor

My subclass of PasswordBrokerManager fails with Larastan with the error:

 ------ ---------------------------------------------------------------------- 
  Line   Services/MyAppPasswordBrokerManager.php                              
 ------ ---------------------------------------------------------------------- 
  22     Call to function is_null() with array will always evaluate to false.  
 ------ ---------------------------------------------------------------------- 

Line 22 is the same as the framework version:

        if (is_null($config)) {
            throw new InvalidArgumentException("Password resetter [{$name}] is not defined.");
        }

I think it's correct that $config can be null and this docblock tweak fixes that for Larastan.

@driesvints driesvints merged commit 921e956 into laravel:10.x Jul 10, 2023
17 checks passed
@driesvints
Copy link
Member

Thanks!

@sfreytag sfreytag deleted the patch-1 branch July 10, 2023 11:28
@GrahamCampbell GrahamCampbell changed the title Tweak return type for missing config [10.x] Tweak return type for missing config Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants