-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Fixed phpstan in Mage/Customer/controllers/AccountController.php #3750
Conversation
I think |
I vote to mark |
Not sure if it is a good change, |
In case |
@kiatng not sure if it is a real use-case, but you could rewrite
... and it would work for every method. With this change you have to override all methods that used _getModel() befor. |
@sreichel I am just trying to fix the complaints of my IDE, vscode + PHP Intelephense, complaining about undefined method |
@kiatng whats wrong with adding Finally i agree with it, but its not what i prefer. |
If we remove the _getModel method I think this should be considered breaking change because it would break overridden code, although it's something probably nobody did. So I'd just add |
ubuntu@DESKTOP-GBHMUPN:~/openmage$ ddev phpstan -l4 /var/www/html/app/code/core/Mage/Customer/controllers/AccountController.php
Note: Using configuration file /var/www/html/phpstan.dist.neon.
1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors Starting with level 5, there are 3 errors, then with each level more and more. I haven't checked what PHPStan level we have set for OpenMage at this moment, but I think this PR will pass it. |
But I am not sure about this
magento-lts/app/code/core/Mage/Customer/controllers/AccountController.php
Lines 46 to 60 in 55b14a3