Problem/Motivation
Update the code so that it follows Drupal coding standards.
Proposed resolution
See what the testbot has to say about the most recent patch. Most of the problems are use of the long array syntax.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 3124616-17.patch | 59.15 KB | benjifisher |
| #17 | interdiff-3124616-16-17.txt | 354 bytes | benjifisher |
| #16 | 3124616-16.patch | 58.98 KB | benjifisher |
| #16 | interdiff-3124616-15-16.txt | 1.34 KB | benjifisher |
| #15 | 3124616-15.patch | 58.94 KB | benjifisher |
Comments
Comment #2
benjifisherLet's see what the testbot thinks of this patch.
The testbot only reports on files that have changed. Luckily, this patch touches several files. This patch just fixes array syntax:
Comment #3
benjifisherHere is a second try at the patch. The previous one was 0 bytes, which means I am more tired than I realized.
Comment #4
benjifisherThe testbot noticed several problems. The following patch addresses two:
usestatement.=,==, and=>.The interdiff shows just these changes.
Comment #5
benjifisherThe attached patch fixes a few more problems:
Comment #6
benjifisherThis patch standardizes line indentation. It means that some of the comments no longer line up nicely, but for now I care more about making the testbot happy.
Comment #7
benjifisherThis patch fixes a few more problems in the doc blocks. I missed these in #5.
Comment #8
benjifisherThis patch fixes a few more indentation errors, doc blocks, and other comments.
Comment #9
benjifisherI set the status to NR because I wanted to trigger tests. In fact, there is more work to do here, so I am setting the status back to NW.
Comment #10
benjifisherHere is another patch that fixes one more line. I hope this fixes the failing test with PHP 7.4.
There is still more to do, but I am setting the status to NR to see whether it does fix the test.
Comment #11
benjifisherSo far, so good. Back to NW.
Comment #12
benjifisherThis patch includes several fixes:
IMO the only reason for some of these (such as (1)) is to keep CodeSniffer happy.
I will not fix the remaining indentation errors in
src/SmartyPants.phpsince that is someone else's copyright/license notice. I think this fixes all the other problems the testbot reported on this issue. There are still some files, not touched in this issue, that have problems.Comment #14
benjifisherThis patch should fix the failing test. I am setting the status to NR to confirm.
There are still several files mentioned on the branch test that need some fixes.
Comment #15
benjifisherFollow Drupal coding standards in the remaining files:
usestatement so that we do not need fully qualified class names later.@paramcomments.With luck, this will be the final patch on this issue.
Comment #16
benjifisherDo it right this time: avoid a name collision.
After all, there is a reason that the original code had a
usestatement forSmartyPantsbut not forTypogrify.Comment #17
benjifisherI installed Upgrade Status and checked the Typogrify module. It reported that one of the automated tests had the wrong namespace. I am calling it in scope for this issue, and this patch should fix it.
The other warnings will be handled in #3126073: Drupal 9 compatibility.
Comment #18
benjifisherI am reviewing this myself. This is not the best practice, but
Comment #19
benjifisherNote that the patch in #17 changes the name of the method to lowerCamelCase:
but not the option for the Twig filter:
Comment #20
benjifisherThe patch in #17 looks good to me.
Comment #22
benjifisherComment #23
wim leersLovely! 😍