There are some coding standard issues in module.

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jayesh_makwana created an issue. See original summary.

jayesh_makwana’s picture

We create a patch for solving coding standard issues for this module. Please check and apply it.

Anupam_Dhauria’s picture

Assigned: jayesh_makwana » Anupam_Dhauria
Status: Active » Needs review

Hi @jayesh_makwana,
Thanks for the patch . I will review this.

Anupam_Dhauria’s picture

Status: Needs review » Needs work

Hii @jayesh_makwana,
your patch applied cleanly.

win10@DESKTOP-VCMGGU5 MINGW64 /c/xampp/htdocs/DRUPAL CONTRIB/drup8/web/modules/contrib/dream_permissions-2885389 (2885389-coding-standard-issues)
$ git apply -v dream_permissionscodingstandard-2885389-2.patch
Checking patch dream_permissions.module...
Checking patch src/Controller/Controller.php...
Checking patch src/Form/AdminPageForm.php...
Checking patch src/Form/DreamPermissions.php...
Applied patch dream_permissions.module cleanly.
Applied patch src/Controller/Controller.php cleanly.
Applied patch src/Form/AdminPageForm.php cleanly.
Applied patch src/Form/DreamPermissions.php cleanly.

But Still I am getting errors.

win10@DESKTOP-VCMGGU5 MINGW64 /c/xampp/htdocs/DRUPAL CONTRIB/drup8/web/modules/contrib
$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dream_permissions-2885389/

FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\dream_permissions-2885389\css\dream_permissions.css
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\dream_permissions-2885389\dream_permissions.info.yml
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 1 | WARNING | "core_version_requirement" property is missing in the info.yml file
-------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\dream_permissions-2885389\dream_permissions.module
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\dream_permissions-2885389\src\Controller\Controller.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 18 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 62 | WARNING | [x] '@TODO split in 2 parts: logic and json.' should match the format '@todo Fix problem X here.'
 71 | WARNING | [ ] Role::load calls should be avoided in classes, use dependency injection instead
 95 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\dream_permissions-2885389\src\Form\AdminPageForm.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\dream_permissions-2885389\src\Form\DreamPermissions.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 225 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

Time: 1.58 secs; Memory: 12MB

Moving to need work. I am working on it.

Anupam_Dhauria’s picture

Assigned: Anupam_Dhauria » Unassigned
Status: Needs work » Needs review
FileSize
16.78 KB

Hi,
I have worked on this issue.
providing patch for review.

Thanks

win10@DESKTOP-VCMGGU5 MINGW64 /c/xampp/htdocs/DRUPAL CONTRIB/drup8/web/modules/contrib
$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dream_permissions-2885389/

win10@DESKTOP-VCMGGU5 MINGW64 /c/xampp/htdocs/DRUPAL CONTRIB/drup8/web/modules/contrib
$ phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dream_permissions-2885389/

No fixable errors were found

Time: 924ms; Memory: 12MB

himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya

I will review patch

himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned

Getting issues with cloning not getting all files

rohit.rawat619’s picture

Assigned: Unassigned » rohit.rawat619
Status: Needs review » Active

Following some Coding standard

rohit.rawat619’s picture

Assigned: rohit.rawat619 » Unassigned
Status: Active » Needs review
FileSize
1.9 KB