-
Notifications
You must be signed in to change notification settings - Fork 54
Address code style issues #365
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
base: master
Are you sure you want to change the base?
Conversation
removed old compatibility checks (auto) reformatted the code used guardian pattern to reduce complexity removed unneeded line feeds
(auto) reformatted removed unneeded line feeds
(auto) reformatted guardian pattern
removed old compatibility checks (auto) reformatted droped line feeds
guardian pattern dropped old compatibility (auto) reformatted
(auto) reformatted guardian pattern
removed old compability (auto) reformatting guardian
mostly (auto) reformatting The render method is quite long and complex and proabably should be split up later
(auto) reformatting PSR-2 renaming I started on cleaning up the instruction handling methods, but left most of them as is. This needs a more detail oriented refactoring. The passing of an instruction array that is modified by reference is not ideal. Methods still need type hints and parameter doc blocks.
(auto) reformatting PSR-2 name changes
Klap-in
left a comment
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.
Looks logical from the diff. Not tested further. Some minor notes.
Instead the debug logger is used.
|
Other plugins that needs a fix for this:
(Results from codesearch with 2 year old indexation) First thought https://www.dokuwiki.org/plugin:mediasyntax was also using the include plugin, but it copied quite a bit. So we could give a notice, such that it can keep inline eventually. |
|
@Klap-in I added support for those three methods via a __call() method. Haven't tested this though. |
|
With the updated index I found also ‘tagfilter’ uses this helper, but the used methods are already covered. Thanks, fine for me! I have not yet an opportunity to test. |
This fixes most of the code style issues. PHP Code Sniffer and Rector have been applied file by file, so it's easier to review individual commits than everything at once.
This mostly addresses the obvious style issues but does not refactor the code (except for some smaller things I noticed while going through the code). Especially helper and action would need some more love (and doc blocks).
Note: for PSR-2 compatibility I had to rename a whole bunch of methods. Theoretically only the getFlags() method is supposed to be used from outside as it is the only one returned in getMethods, but I doubt that is the case. This branch should be checked at least with the blog plugin before merging.