81 | ERROR | [ ] Type hint "\Drupal\Core\Entity\EntityManagerInterface" missing for $entity_manager
106 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
132 | ERROR | [ ] Return type missing for @return tag in function comment
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | standards_error-3104168-13.patch | 522 bytes | sulfikar_s |
| #13 | after-patch.png | 34.69 KB | sulfikar_s |
| #4 | 3104168-4.patch | 1.74 KB | akashkumar07 |
| #3 | 3104168-3.patch | 1.74 KB | akashkumar07 |
| #2 | removing_drupal_coding_errors-3104168-2.patch | 1.49 KB | hardik_patel_12 |
Comments
Comment #2
hardik_patel_12 commentedKindly apply a new patch
Comment #3
akashkumar07 commentedComment #4
akashkumar07 commentedComment #5
naresh_bavaskarComment #6
naresh_bavaskarLooks good to me.
Comment #7
catchI think the return here is a string rather than array (i.e. it's a string value, extracted from the array).
Core tests are failing for some reason:
Comment #8
longwaveTests are failing because we can't make this change; since #3025152: Remove entityManager constructor argument from SystemManager the $entity_manager is not used and NULL is passed in, which doesn't meet the interface requirements.
This has already been removed in 9.x but here maybe we can change the docblock to remove the typehint and mention "(unused)" after the parameter description or similar?
Comment #9
hardik_patel_12 commentedHandled in #3106275: \Drupal calls should be avoided in classes, use dependency injection instead in CronAccessCheck.php
Comment #10
hardik_patel_12 commentedSorry by mistake done by me for above comment
Comment #13
sulfikar_s commentedHello all, the patch in #4 is not applying on 9.2.x-dev,
Also I've found that 'EntityManagerInterface' is not used anywhere in 9.2.x. Found that 'EntityManagerInterface' is deprecated and removed from 9.0 through research, here's the link https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
Also now in the '/core/modules/system/src/SystemManager.php', there is only one minor coding standard issue is found. I'm attaching the patch for it.
Please review
Comment #14
longwaveThanks for looking at this. Now the other lines are gone and only this issue remains, I am closing this as duplicate of #2719663: Fix 'Drupal.Commenting.InlineComment.InvalidEndChar' coding standard
When fixing coding standards issues we do them across the whole of Drupal at once and add configuration to ensure they remain fixed. File by file is too time consuming and prone to errors. Therefore this is better fixed across core in the linked issue.