Closed pattonwebz closed 5 years ago
@schlessera @jrfnl If you could look at this one and give me any feedback about it that would be good. Also advice about if I should silence the 2 remaining warnings.
And if you could confirm that the PR: #47 is matching what is expected that'd be awesome. If this is the way to go about this I will be able to look at more of the command repos tomorrow and do the same thing in those.
The only thing flagged in this repo now is:
williampatton@williampatton-ws:~/git-repos/wpclicmd/embed-command$ phpcs --standard=WPCliCS ./
FILE: /home/williampatton/git-repos/wpclicmd/embed-command/src/Fetch_Command.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
237 | WARNING | Method name "_oembed_create_xml" should not be prefixed with
| | an underscore to indicate visibility
--------------------------------------------------------------------------------
Time: 343ms; Memory: 12MB
@schlessera this final one will be your decision about what to do here. Whitelist or fix.
I think you can safely rename the _oembed_create_xml
method to just remove the underscore. It is used in two places within the FetchCommand
only.
This PR should be ready for checking. The ruleset is added in #47 and after that is merged the PHPCS checks should pass on this PR.
There is still a non-related issue causing the unit tests to fail though. I have not investigated that fail however it was present in the build prior to the updates added in the 2 CS changesets.
@pattonwebz Regarding the failing test, this should be fixed via https://github.com/wp-cli/embed-command/pull/50. As soon as that one is merged, you can get your tests passing by pulling in latest master.
@pattonwebz https://github.com/wp-cli/embed-command/pull/50 was merged, can you merge in latest master here?
This applies some changes to bring the code in line with the new WPCliCS ruleset.
There are only 2 remaining
WARNING
s in this package at the time when I open this PR. Some advice about if I should silence the warnings. The 2 items left are:The
_oembed_create_xml
method I guess I should silence but what about the use ofserialize()
?This is part 2 of #45
Related https://github.com/wp-cli/wp-cli/issues/5179