-
Notifications
You must be signed in to change notification settings - Fork 71
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
Test enhancement #84
Test enhancement #84
Conversation
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.
Hi,
thanks for the PR. Looks good. I've noticed only one thing to be changed.
src/MetadataFactory.php
Outdated
/** | ||
* @var null|string | ||
*/ | ||
private $hierarchyMetadataClass; |
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.
I guess this property should not have been removed
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.
I remove this variable because the coding style check will be failed.
Here is the history log.
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.
it is the bug of the style checker, the property is being read at
metadata/src/MetadataFactory.php
Line 152 in 8eec675
$metadata = new $this->hierarchyMetadataClass(); |
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.
Ok. Reverting this change :).
8eec675
to
45bdfbe
Compare
To not have https://travis-ci.org/open-source-contributions/metadata/jobs/602205210 failing, you can assign metadata/src/MetadataFactory.php Line 152 in 8eec675
like: $class = $this->hierarchyMetadataClass;
$metadata = new $class(); That is even more correct than the current code. |
Thanks for your reply. But it still has the same coding style issue. |
Ok. I got no coding style error finally. Forgiving my fault 😄. |
👍 |
45bdfbe
to
a974c82
Compare
I think that there is an error in your rebase... I can see some extra commits |
a974c82
to
edf7895
Compare
edf7895
to
02e75c4
Compare
Sorry. I make mistake about rebase... Reverting commits. |
Thank you |
Changed log
php-7.2
andphp-7.3
version tests on Travis CI build.::class
magic class string call to replace the class name string.assertCount
to assert the expected count value is same as result count value.setUp
method isprotected
, notpublic
.When using the composer
--prefer-lowest
and--prefer-stable
flags onphp-7.2
version, this will cause the following coding style issue:It seems that the private
$hierarchyMetadataClass
variable is unused.To pass this coding style check, removing this variable.