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
Various fixes after static analysis #821
Various fixes after static analysis #821
Conversation
0227fea
to
735f26a
Compare
@@ -39,7 +39,7 @@ public function __construct(Reader $reader, PropertyMetadataFactoryInterface $de | |||
public function create(string $resourceClass, string $property, array $options = []) : PropertyMetadata | |||
{ | |||
$parentPropertyMetadata = null; | |||
if (isset($this->decorated)) { | |||
if ($this->decorated) { |
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.
Can even be compared explicitly to 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.
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.
Shouldn't we prefer to be explicit? 😞
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.
Anyway we must be consistent and AFAIK we use this in other part of the code base. null ===
is ok too, but isset
is weird.
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.
Yes, I'm for avoiding isset
and empty
as much as possible.
a9328e4
to
d49429e
Compare
d49429e
to
83da509
Compare
Thanks @meyerbaptiste |
…after_static_analysis Various fixes after static analysis
Found by: