Problem/Motivation

- composer.json is not needed as the module as no special dependencies.
- LICENSE.txt is added automatically by Drupal.org packaging system.

But, I see that the module is also on Github https://github.com/pdureau/ui_examples. So? Which repository is the canonical one?

PHPCS:

FILE: project/app/modules/custom/ui_examples/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
  6 | WARNING | Line exceeds 80 characters; contains 119 characters
 15 | WARNING | Line exceeds 80 characters; contains 82 characters
----------------------------------------------------------------------


FILE: project/app/modules/custom/ui_examples/ui_examples.links.menu.yml
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
 5 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------


FILE: project/app/modules/custom/ui_examples/src/ExamplePluginManagerInterface.php
----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------
 1 | ERROR | Missing required strict_types declaration
----------------------------------------------------------------------------------


FILE: project/app/modules/custom/ui_examples/ui_examples.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | Missing required strict_types declaration
----------------------------------------------------------------------


FILE: project/app/modules/custom/ui_examples/src/Controller/ExamplesLibraryController.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------
  1 | ERROR   | Missing required strict_types declaration
 13 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------


FILE: project/app/modules/custom/ui_examples/src/ExamplePluginManager.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [ ] Missing required strict_types declaration
 74 | WARNING | [x] 'TODO: Add validation of the plugin definition here.' should match the format '@todo Fix problem X here.'
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------

PHPStan:

 ------ -------------------------------------------------------------------------------------------------------------------------- 
  Line   modules/custom/ui_examples/src/Controller/ExamplesLibraryController.php                                                   
 ------ -------------------------------------------------------------------------------------------------------------------------- 
  33     Method Drupal\ui_examples\Controller\ExamplesLibraryController::create() has no return typehint specified.                
  56     Method Drupal\ui_examples\Controller\ExamplesLibraryController::single() has parameter $name with no typehint specified.  
  67     Method Drupal\ui_examples\Controller\ExamplesLibraryController::title() has parameter $name with no typehint specified.   
 ------ -------------------------------------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------------------------------- 
  Line   modules/custom/ui_examples/src/ExamplePluginManager.php                                                                    
 ------ --------------------------------------------------------------------------------------------------------------------------- 
  17     Drupal\ui_examples\ExamplePluginManager must override __construct if using YAML plugins.                                   
  17     Plugin definitions cannot be altered.                                                                                      
  72     Method Drupal\ui_examples\ExamplePluginManager::processDefinition() has no return typehint specified.                      
  72     Method Drupal\ui_examples\ExamplePluginManager::processDefinition() has parameter $definition with no typehint specified.  
  72     Method Drupal\ui_examples\ExamplePluginManager::processDefinition() has parameter $plugin_id with no typehint specified.   
  83     Method Drupal\ui_examples\ExamplePluginManager::providerExists() has parameter $provider with no typehint specified.       
 ------ --------------------------------------------------------------------------------------------------------------------------- 

Also some typos and using single quotes instead of double quotes.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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:

Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

About PHPStan

17     Drupal\ui_examples\ExamplePluginManager must override __construct if using YAML plugins.

It is a bug in PHPStan Drupal: https://github.com/mglaman/phpstan-drupal/issues/142

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review

There is only:

15 | WARNING | Line exceeds 80 characters; contains 82 characters

in README.md that I was not able to fix as it is a code example.

  • Grimreaper authored f899244 on 1.x
    Issue #3214705 by Grimreaper: Fix code quality and best practices
    
grimreaper’s picture

Status: Needs review » Fixed

Merged

grimreaper’s picture

  • Grimreaper authored 5e97893 on 1.x
    Issue #3214705 by Grimreaper: Fix code quality and best practices
    
grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.