Problem/Motivation
Drupal coding standard and Practice issues need to resolve.
FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\conflict\conflict.api.php
----------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
47 | ERROR | Doc comment is empty
----------------------------------------------------------------------------------
FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\conflict\conflict.module
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------
115 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
--------------------------------------------------------------------------------------------------------------------------------------------
FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\conflict\modules\conflict_paragraphs\conflict_paragraphs.module
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
------------------------------------------------------------------------------------------------------------------------
FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\conflict\modules\conflict_paragraphs\src\Plugin\Conflict\FieldComparator\FieldComparatorParagraphReference.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
256 | WARNING | Unused variable $removed_entity_form_display.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\conflict\src\Entity\ContentEntityConflictHandler.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------
197 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
--------------------------------------------------------------------------------------------------------------------------------------------
Time: 893ms; Memory: 14MB
Steps to reproduce
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml conflict/
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | conflict-3293562-24.patch | 51.89 KB | silvi.addweb |
| #15 | interdiff_Codingstandard-3293562-13-3293562-15.txt | 1.65 KB | alexanderj |
| #15 | 3293562-15.patch | 55.97 KB | alexanderj |
| #13 | Codingstandard-3293562-13.patch | 55.13 KB | ramonvasconcelos |
| #9 | Codingstandard-3293562-9.patch | 50.98 KB | pflora |
Issue fork conflict-3293562
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
immaculatexavier commentedComment #3
immaculatexavier commentedThe phpcs issues mentioned in Problem/Motivation have been resolved.
Comment #4
arunkumark@immaculatexavier
Patch #3, only resolve a few issues. Please find the complete list of Drupal coding standards and best practices for the conflict module.
Comment #5
indrapatil commentedComment #6
indrapatil commentedHi,
Please review this patch.
Comment #7
lucasbaralmGood Morning! Thanks for the work, the patch fixes a lot of standard issues. Some standard issues still persist, in the attached file I mention them.
Comment #8
pflora commentedI'll work on it.
Comment #9
pflora commentedHere's the new patch with the requested changes.
Comment #10
pflora commentedComment #11
ramonvasconcelos commentedI'll review it.
Comment #12
ramonvasconcelos commentedAfter checking the module files again with PHPCS there are still some errors.
I'll try to fix them.
Comment #13
ramonvasconcelos commentedPlease, review it.
Comment #14
alexanderj commentedI will review it.
Comment #15
alexanderj commentedAfter reviewing the module, i found more PHPCS terrors.
I'll try to fix them.
Please, review it.
Comment #16
alexanderj commentedComment #17
ramonvasconcelos commentedI'll review it.
Comment #18
ramonvasconcelos commentedEverything in order. There are some minor warnings in JS a file but i dont think they would improve code readability.
Comment #19
avpadernoThe usual short description for a module is Hook implementations for the [module name] module. Using an empty comment is just a workaround.
That comment is meaningless. Instead of fixing a word spelling, it would be better to remove the comment.
That short description could be correct, but it needs to be more specific, as that class does not removed every content entity conflict.
The changed code is not more readable.
What follows
@todois a sentence: It starts with a capitalized word and it ends with a period.The sentence following
@todomust describe what needs to be changed. In this case, it just describes the actual code.The short description is missing an article.
Those words are misspelled, since in English words are spelled capitalized basing on specific rules.
If the first word in a short description is a verb, it must use the third-person singular (eats, drinks, tastes.)
Comment #22
avpadernoAlso, why only a ruleset is used instead of the two existing rulesets PHP_CodeSniffer has for Drupal?
Comment #23
zkhan.aamir commentedUpdated issue summary.
Comment #24
silvi.addweb commentedI've applied all patches but found some phpcs issues so I created with all fixes. Please review it.
Comment #26
avpadernoComment #27
avpadernoThe 8.x-2.x branch is not the recommended branch, which instead is the 3.0.x branch. Issues should be fixed in that branch.
Comment #28
avpaderno