FILE: /project/app/modules/custom/entity_visibility_preview/modules/entity_visibility_preview_simple_grants/entity_visibility_preview_simple_grants.install
-----------------------------------------------------------------------------------------------------------------------------------------------------------
28 | VIOLATION | Avoid using undefined variables such as '$schema' which will lead to PHP notices.
67 | VIOLATION | Avoid using undefined variables such as '$schema' which will lead to PHP notices.

FILE: /project/app/modules/custom/entity_visibility_preview/modules/entity_visibility_preview_simple_grants/entity_visibility_preview_simple_grants.module
----------------------------------------------------------------------------------------------------------------------------------------------------------
50 | VIOLATION | Avoid variables with short names like $op. Configured minimum length is 3.

FILE: /project/app/modules/custom/entity_visibility_preview/modules/entity_visibility_preview_simple_grants/src/Service/EntityVisibilityPreviewSimpleGrantsGrantsHelper.php
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
136 | VIOLATION | Avoid unused local variables such as '$fieldInfos'.

FILE: /project/app/modules/custom/entity_visibility_preview/modules/entity_visibility_preview_simple_grants/tests/src/FunctionalJavascript/EntityVisibilityPreviewListFunctionalJavascriptTestBase.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
96 | VIOLATION | The method setUp() has 149 lines of code. Current threshold is set to 100. Avoid really long methods.
96 | VIOLATION | The method setUp() has 149 lines of code. Current threshold is set to 100. Avoid really long methods.

FILE: /project/app/modules/custom/entity_visibility_preview/modules/entity_visibility_preview_simple_grants/tests/src/FunctionalJavascript/EntityVisibilityPreviewListFunctionalJavascriptTestBaseMultipleSegments.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
106 | VIOLATION | The method setUp() has 330 lines of code. Current threshold is set to 100. Avoid really long methods.
106 | VIOLATION | The method setUp() has 330 lines of code. Current threshold is set to 100. Avoid really long methods.

FILE: /project/app/modules/custom/entity_visibility_preview/src/Controller/PreviewMessage.php
---------------------------------------------------------------------------------------------
55 | VIOLATION | Avoid unused local variables such as '$plugin_definition'.

FILE: /project/app/modules/custom/entity_visibility_preview/src/EntityVisibilityPreviewConditionPluginBase.php
--------------------------------------------------------------------------------------------------------------
19 | VIOLATION | The class EntityVisibilityPreviewConditionPluginBase has 11 public methods. Consider refactoring EntityVisibilityPreviewConditionPluginBase to keep number of public methods under 10.

FILE: /project/app/modules/custom/entity_visibility_preview/src/Form/PreviewForm.php
------------------------------------------------------------------------------------
70 | VIOLATION | Avoid unused local variables such as '$plugin_definition'.
95 | VIOLATION | Avoid unused local variables such as '$plugin_definition'.
113 | VIOLATION | Avoid unused local variables such as '$plugin_definition'.

FILE: /project/app/modules/custom/entity_visibility_preview/src/Form/TaxonomyConditionGlobalConfigurationForm.php
-----------------------------------------------------------------------------------------------------------------
151 | VIOLATION | Avoid unused local variables such as '$plugin_definition'.

FILE: /project/app/modules/custom/entity_visibility_preview/src/HookHandler/EntityAccessHookHandler.php
-------------------------------------------------------------------------------------------------------
91 | VIOLATION | The method process() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10.
91 | VIOLATION | The method process() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10.

FILE: /project/app/modules/custom/entity_visibility_preview/src/HookHandler/ToolbarHookHandler.php
--------------------------------------------------------------------------------------------------
70 | VIOLATION | Avoid using undefined variables such as '$items' which will lead to PHP notices.
77 | VIOLATION | Avoid using undefined variables such as '$items' which will lead to PHP notices.
109 | VIOLATION | Avoid using undefined variables such as '$items' which will lead to PHP notices.

FILE: /project/app/modules/custom/entity_visibility_preview/src/Plugin/EntityVisibilityPreviewCondition/DateRangeCondition.php
------------------------------------------------------------------------------------------------------------------------------
25 | VIOLATION | The class DateRangeCondition has 12 public methods. Consider refactoring DateRangeCondition to keep number of public methods under 10.
145 | VIOLATION | The method accessCheck() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
145 | VIOLATION | The method accessCheck() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.

FILE: /project/app/modules/custom/entity_visibility_preview/src/Plugin/EntityVisibilityPreviewCondition/TaxonomyCondition.php
-----------------------------------------------------------------------------------------------------------------------------
25 | VIOLATION | The class TaxonomyCondition has an overall complexity of 61 which is very high. The configured complexity threshold is 50.
25 | VIOLATION | The class TaxonomyCondition has a coupling between objects value of 16. Consider to reduce the number of dependencies under 13.

FILE: /project/app/modules/custom/entity_visibility_preview/src/Plugin/Field/FieldType/EntityVisibilityPreviewItem.php
----------------------------------------------------------------------------------------------------------------------
144 | VIOLATION | Avoid using undefined variables such as '$properties' which will lead to PHP notices.
148 | VIOLATION | Avoid using undefined variables such as '$properties' which will lead to PHP notices.

FILE: /project/app/modules/custom/entity_visibility_preview/src/Service/EntityVisibilityPreviewTaxonomyHelper.php
-----------------------------------------------------------------------------------------------------------------
109 | VIOLATION | Avoid using empty try-catch blocks in getVocabularyFromId.

FILE: /project/app/modules/custom/entity_visibility_preview/src/Service/SessionManagerInterface.php
---------------------------------------------------------------------------------------------------
65 | VIOLATION | The 'getPreviewIsActive()' method which returns a boolean should be named 'is...()' or 'has...()'

FILE: /project/app/modules/custom/entity_visibility_preview/tests/src/Functional/TaxonomyConditionTest.php
----------------------------------------------------------------------------------------------------------
97 | VIOLATION | The method testTaxonomyPlugin() has 137 lines of code. Current threshold is set to 100. Avoid really long methods.
97 | VIOLATION | The method testTaxonomyPlugin() has 137 lines of code. Current threshold is set to 100. Avoid really long methods.

FILE: /project/app/modules/custom/entity_visibility_preview/tests/src/Functional/WebsitePreviewFormTest.php
-----------------------------------------------------------------------------------------------------------
92 | VIOLATION | The method datePreviewTest has a boolean flag argument $reset, which is a certain sign of a Single Responsibility Principle violation.

Comments

Grimreaper created an issue. See original summary.

  • Grimreaper authored e9e8cf1 on 8.x-1.x
    Issue #3138251 by Grimreaper: Fix PHPMD except violation with threshold.
    
Grimreaper’s picture

Status: Active » Fixed

Fixed except violations with threshold as this is arbitrary.

Status: Fixed » Closed (fixed)

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