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

Fix: Return type mismatch between screen facade and screen class methods. #463

Conversation

kondi3
Copy link
Contributor

@kondi3 kondi3 commented Jan 8, 2025

This pull request fixes method return type mismatches between the Native\Laravel\Facades\Screen facade and Native\Laravel\Screen class.

Before, when a method was called using the facade that had a return type mismatch, it would cause a TypeError, refer to screenshot below.

NativePHP-TypeError-Screenshot

This fix changed the return types on methods in the Native\Laravel\Screen class to match their corresponding method signature in the Native\Laravel\Facades\Screen facade as this did not introduce new issues in current code that is using the methods in question which are listed below.

  • Native\Laravel\Screen::primary()
  • Native\Laravel\Screen::active()

Copy link
Member

@simonhamp simonhamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@simonhamp simonhamp merged commit 36abbb6 into NativePHP:main Jan 11, 2025
1 check passed
@kondi3 kondi3 deleted the fix/return-type-mismatch-in-screen-and-screen-facade branch January 13, 2025 06:20
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.

2 participants