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

The userId property is normalized to int so no need to type-cast it #258

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

spaze
Copy link
Owner

@spaze spaze commented Dec 26, 2023

Resolves

 ------ -------------------------------------------------------
  Line   app/User/Manager.php
 ------ -------------------------------------------------------
  129    Unreachable statement - code above always terminates.
 ------ -------------------------------------------------------

which happens because nette/database 3.2.0 added never return type to Row::__get().

This way, PhpStorm complains "Return value must be of type 'int', 'never' returned" but PHPStan doesn't, so...

@spaze spaze self-assigned this Dec 26, 2023
@spaze spaze force-pushed the spaze/user-id-int branch from 405c686 to a09eb16 Compare December 26, 2023 15:01
Resolves
```
 ------ -------------------------------------------------------
  Line   app/User/Manager.php
 ------ -------------------------------------------------------
  129    Unreachable statement - code above always terminates.
 ------ -------------------------------------------------------
```
which happens because nette/database 3.2.0 added `never` return type to Row::__get().

This way, PhpStorm complains "Return value must be of type 'int', 'never' returned" but PHPStan doesn't, so...
@spaze spaze force-pushed the spaze/user-id-int branch from a09eb16 to 4ccf191 Compare December 26, 2023 15:06
@spaze spaze merged commit 9622dff into main Dec 26, 2023
32 checks passed
@spaze spaze deleted the spaze/user-id-int branch December 26, 2023 15:09
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.

1 participant