-
Notifications
You must be signed in to change notification settings - Fork 380
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
Add PHPStan #468
Add PHPStan #468
Conversation
@@ -14,13 +15,21 @@ | |||
* Sets the username from the security context by listening on kernel.request | |||
* | |||
* @author Christophe Coevoet <[email protected]> | |||
* | |||
* @phpstan-template T of Loggable|object |
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.
is this right?
@@ -31,11 +32,13 @@ public function getName() | |||
} | |||
|
|||
/** | |||
* @return ?string | |||
* @return int|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.
covariance with interface
@@ -14,13 +15,21 @@ | |||
* Sets the username from the security context by listening on kernel.request | |||
* | |||
* @author Christophe Coevoet <[email protected]> | |||
* | |||
* @phpstan-template T of Loggable|object |
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.
Loggable|object
is the same than object
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.
used the same definition as in LoggableListener, so what should I do here?
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.
Either leave it as is or just make it T of object
. Gedmo\Loggable\Loggable
is an optional marker interface folks can use in their applications if they want to mark their models as loggable, but nothing requires implementing it and the only references to it in the library are template annotations.
tests/DependencyInjection/StofDoctrineExtensionsExtensionTest.php
Outdated
Show resolved
Hide resolved
tests/DependencyInjection/StofDoctrineExtensionsExtensionTest.php
Outdated
Show resolved
Hide resolved
cfeb7f6
to
252bd9b
Compare
No description provided.