-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 CS errors and issues reported by static analyzers #14189
Conversation
src/Console/HelperRegistry.php
Outdated
@@ -55,8 +55,7 @@ public function setIo(ConsoleIo $io): void | |||
* Part of the template method for Cake\Core\ObjectRegistry::load() | |||
* | |||
* @param string $class Partial classname to resolve. | |||
* @return string|null Either the correct class name or null. | |||
* @psalm-return class-string | |||
* @return class-string|null Either the correct class name or null. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeResolver doesn't seem to handle class-string
yet. Maybe I can add it in a PR.
src/Cache/CacheRegistry.php
Outdated
@@ -36,8 +36,7 @@ class CacheRegistry extends ObjectRegistry | |||
* Part of the template method for Cake\Core\ObjectRegistry::load() | |||
* | |||
* @param string $class Partial classname to resolve. | |||
* @return string|null Either the correct classname or null. | |||
* @psalm-return class-string | |||
* @return class-string|null Either the correct classname or null. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldnt do this yet.
Opened PR for class-string support in TypeResolver so we don't have to rely on psalm-specific annotations. |
Both phpstan and psalm (and even phan) support |
Maybe not IDEs and other tools? For them it is still string. |
The phpcs ignores can be removed once slevomat/coding-standard#851 is addressed.