Closed (fixed)
Project:
Cloud
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
13 Aug 2020 at 00:20 UTC
Updated:
30 Sep 2020 at 03:09 UTC
Jump to comment: Most recent, Most recent file
$ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /var/www/html/web/modules/contrib/cloud/
FILE: /var/www/html/web/modules/contrib/cloud/src/Plugin/Derivative/CloudMenuLinks.php
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------
56 | WARNING | Unused variable $cloud_config_type.
--------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Plugin/Derivative/CloudDesignMenuLinks.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
70 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
79 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
89 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Plugin/Block/CloudConfigLocationBlock.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
280 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Plugin/Field/FieldFormatter/CloudImageFormatter.php
-----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
95 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Plugin/Field/FieldFormatter/InstanceLinkFormatter.php
-------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
142 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Plugin/cloud/server_template/CloudServerTemplatePluginManager.php
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------
176 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
199 | WARNING | Unused variable $url.
-------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Plugin/cloud/project/CloudProjectPluginManager.php
----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------
173 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
196 | WARNING | Unused variable $url.
----------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Controller/CloudConfigLocationController.php
-------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------
236 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
290 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Form/CloudProjectRevisionDeleteForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
140 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/src/Service/CloudService.php
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
301 | WARNING | Role::loadMultiple calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/cloud.routing.yml
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
95 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/tests/src/Functional/Module/CloudModuleTestBase.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
326 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/tests/src/Functional/cloud/config/CloudConfigTestBase.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
118 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/gapps/src/Form/Config/GAppsAdminSettings.php
--------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
82 | WARNING | Unused variable $config.
--------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/tools/k8s_to_s3/k8s_to_s3.module
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------
136 | WARNING | Unused variable $key.
221 | WARNING | Unused variable $containers.
--------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Plugin/Block/ResourcesBlock.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
236 | WARNING | Unused private method getInstanceTypePricingLink()
---------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Plugin/Block/DetachedVolumesBlock.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
32 | WARNING | Unused variable $entity_type_id.
---------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Plugin/Validation/Constraint/IpPermissionDataConstraintValidator.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------
126 | WARNING | Unused variable $key.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Plugin/Validation/Constraint/SecurityGroupNameConstraintValidator.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
76 | WARNING | Unused variable $violations.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Controller/Ec2/AwsCloudKeyPairController.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------
54 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Form/Config/AwsCloudAdminSettings.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------------------------------
346 | WARNING | Unused variable $old_config.
353 | WARNING | Unused variable $instance_time.
354 | WARNING | Unused variable $volume_time.
355 | WARNING | Unused variable $snapshot_time.
375 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
449 | WARNING | Unused private method shouldCacheBeCleaned()
---------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Form/Config/AwsCloudAdminNotificationSettings.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
532 | WARNING | Unused variable $views_settings.
616 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Form/Ec2/SecurityGroupCopyForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
113 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Form/Ec2/InstanceMonitorForm.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
133 | WARNING | Unused variable $entity.
----------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Service/Pricing/PricingService.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
220 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/tests/src/Traits/AwsCloudTestFormDataTrait.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------------
63 | WARNING | Unused variable $cloud_context.
767 | WARNING | Unused variable $group_id.
845 | ERROR | Use of self::$awsCloudSecurityGroupRulesInbound inside closure.
--------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/tests/src/Functional/Ec2/InstanceTest.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
61 | WARNING | Unused variable $state.
---------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/aws_cloud.module
--------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------
3086 | WARNING | Unused variable $instance_ids_to_notify.
3964 | WARNING | Unused variable $cloud_config.
4212 | WARNING | Unused variable $alias.
--------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/docker/src/Service/DockerService.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------
239 | WARNING | Unused variable $response.
243 | WARNING | Unused variable $image.
257 | WARNING | Unused variable $response.
------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Plugin/Derivative/K8sMenuLinks.php
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
241 | WARNING | Variable $namespace is undefined.
314 | WARNING | Unused private method getNamespaceEntities()
------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Plugin/Block/K8sNamespaceCostsChartBlock.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
131 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Plugin/cloud/server_template/K8sCloudServerTemplatePlugin.php
---------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------
288 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
314 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
451 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
474 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
488 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
494 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
---------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Plugin/cloud/project/K8sCloudProjectPlugin.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------
238 | WARNING | Unused variable $k8s_cluster.
------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Entity/K8sDeploymentViewsData.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
33 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
34 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Entity/K8sPodViewsData.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
33 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
34 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Controller/ApiController.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------
506 | WARNING | Unused variable $node_name.
535 | WARNING | Unused variable $entity_type_name_capital.
------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Controller/K8sNamespaceCostsChartController.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
277 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Form/Config/K8sAdminSettings.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
153 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Form/K8sPodLogForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
37 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Service/K8sService.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
1927 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
1939 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
1945 | WARNING | Unused variable $link.
2287 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
2309 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
2380 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Service/K8sBatchOperations.php
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
1875 | WARNING | Unused variable $key.
2294 | WARNING | Unused variable $rule.
--------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Service/CostFieldsRenderer.php
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
45 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/tests/src/Traits/K8sTestFormDataTrait.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
1103 | WARNING | Unused variable $random.
---------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/k8s.install
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
1346 | WARNING | Unused variable $k8s_service.
---------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/k8s/k8s.module
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------
1924 | WARNING | Unused variable $project.
2023 | WARNING | Unused variable $k8s_cluster.
2061 | WARNING | Unused variable $project.
2164 | WARNING | #description values usually have to run through t() for translation
2170 | WARNING | #description values usually have to run through t() for translation
--------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/terraform/src/Traits/TerraformFormTrait.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
226 | WARNING | Unused variable $result.
-------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/terraform/src/Form/Config/TerraformAdminSettings.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
128 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/terraform/src/Form/TerraformWorkspaceCreateForm.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
119 | WARNING | Unused variable $result.
---------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/terraform/src/Form/TerraformRunApplyForm.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
48 | WARNING | Unused variable $result.
--------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/terraform/src/Form/TerraformVariableEditForm.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
135 | WARNING | Unused variable $result.
------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/terraform/src/Service/TerraformService.php
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
194 | WARNING | Unused variable $organization.
313 | WARNING | Unused variable $organization.
------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Plugin/cloud/server_template/OpenStackServerTemplatePlugin.php
----------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------
251 | WARNING | Unused variable $result.
----------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Form/Config/OpenStackAdminSettings.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
194 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Form/OpenStackNetworkInterfaceEditForm.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
55 | WARNING | Unused variable $entity.
--------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Service/OpenStackEc2Service.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------
122 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
202 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
212 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Service/OpenStackBatchOperations.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
52 | WARNING | Unused variable $config_factory.
--------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/tests/src/Functional/OpenStack/OpenStackSecurityGroupTest.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------
351 | WARNING | Unused private method createRuleParams()
-----------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/openstack.module
--------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
1234 | WARNING | Unused variable $cloud_context.
--------------------------------------------------------------------------------------------------------
FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/openstack.info.yml
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
8 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
----------------------------------------------------------------------------------------------------------
Time: 33.54 secs; Memory: 38MB| Comment | File | Size | Author |
|---|---|---|---|
| #59 | 3164928-59-8.x-2.x.patch | 98.51 KB | onotm |
| #59 | 3164928-59-8.x-1.x.patch | 95.96 KB | onotm |
| #59 | 3164928-59-3.x.patch | 100.57 KB | onotm |
Comments
Comment #2
onotm commentedI fixed the warnings about the T function and unused functions or functions.
I have a question.
There is a warning "\Drupal calls should be avoided in classes, use dependency injection instead". How should I fix this warning?
(I searched this warning, but couldn't find a specific solution)
Comment #3
yas@onotm
Thank you for the refactoring. As for DI, you can refer to our past efforts: https://www.drupal.org/project/issues/cloud?text=dependency+injection&st...
HTH
Comment #4
onotm commentedComment #6
onotm commentedComment #8
onotm commented3164928-4.patch fixes all warnings, but fails K8sCloudConfigTest::testCloudConfig and K8sCloudConfigTest::testK8sMenu.
These test functions say 'Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "Save" not found'.
Currently I am looking for the cause of failure.
Comment #10
yas@onotm
You can separate the issue for the test failure. Please drop the error portion from the current patch and upload it.
Comment #11
onotm commentedComment #13
onotm commentedComment #14
onotm commentedComment #15
onotm commentedComment #17
onotm commentedComment #18
onotm commentedComment #20
onotm commentedComment #21
onotm commentedComment #22
onotm commentedComment #23
onotm commentedComment #24
onotm commentedComment #25
onotm commentedComment #26
onotm commentedComment #27
onotm commentedComment #28
onotm commentedComment #29
onotm commentedComment #30
onotm commentedComment #31
onotm commentedComment #32
onotm commentedThis patch fixes all but one warning.
The unfixed warning is
This warning can be fixed by the following patch.
However, applying this patch fails the test. https://www.drupal.org/pift-ci-job/1814866
Comment #33
yasKeep
$this->t(). UseDrupal\Core\StringTranslation\StringTranslationTrait.@xiaohua-guan
Is this OK to delete this code?
Could you please double-check if this code works?
foreach ($entities as $key => $entity)andforeach ($entities as $entry)have different meaning; and moreover, the variable name should be$entity(not$entry).@baldwinlouie and @kumikoono
Is this OK to delete this code?
Please use this code with
array_rand()for'state' => ...below.@baldwinlouie
Is this OK to delete this code? (not used)
@masami, @masatotakada
Can we delete this code?
Could you please double-check if this code works equally as the original one?
@masami, @masatotakada
Can we delete this code?
Delete
$node_name = $node->getName();, Keep$pod_resources = $this->getPodResources($node->getName(), $cloud_context);Consider this logic. Please double-check the logic.
Could you please double-check if this code works equally as the original one?
Could you please double-check if this code works correctly as the original one?
Keep
$this->t(). UseDrupal\Core\StringTranslation\StringTranslationTrait.Keep
$this->t(). UseDrupal\Core\StringTranslation\StringTranslationTrait.@masami, @masatotakada
Can we delete this code?
Probably we can delete this line?
This code is also duplicated?
Could you please double-check?
$cloud_server_template = \Drupal::routeMatch()->getParameter('cloud_server_template');@xiaohua-guan
Can we delete this code?
@xiaohua-guan
Could you please double-check this code?
@xiaohua-guan
Can you double-check this code?
Keep
$this->t(). UseDrupal\Core\StringTranslation\StringTranslationTrait.@masami, @masatotakada
Can we delete this code? (Not used)
@baldwinlouie
Can we delete this code?
Comment #34
xiaohua guan commented@yas @onotm
My answer is as below.
2. The function getInstanceTypePricingLink can't be deleted because it is called in ResourceBlockTrait::buildResourceTableRows().
19. Yes, it can be deleted.
21. Yes, it can be deleted.
Comment #35
masami commented@yas @onotm
7, 9. I think it better to delete the functions.
16, 23. I think they can be deleted.
What do you think @masatotakada?
Comment #36
baldwinlouie commented@yas and @onotm
4. OK to delete
6. OK to delete
24. OK to delete
Comment #37
MasatoTakada commented@yas @masami @onotm
> 12
$k8s_cluster_list are Multiple array, then I thought we need to clarify key and value.
If this syntax has the same meaning, It is okay to me.
# I guess this error is coming from the latest coding violation. It means the same meaning as original code.
# Actually, I have never done this syntax. I am little bit worried about it.
> 16, 23
I thinks these can be deleted.
Comment #38
kumikoono commented@yas @onotm
4. OK to delete
Comment #39
onotm commentedThank you for your comments.
1. This change fixes the "exceptions should not be translated" warning. I added a comment to the code.
2. I removed the getInstanceTypePricingLink function part from the patch.
3. I commented "$key is unused variable" and removed this portion from my patch.
4. No update.
5. I updated the patch like this:
6. No update.
7. I deleted the function k8s_form_cloud_project_k8s_delete_form_alter.
8. I commented "$k8s_cluster is unused variable" and removed this portion from my patch.
9. I deleted the function k8s_form_cloud_project_k8s_form_submit.
10: I updated the patch like this:
11. I removed this change from the patch. This code was to fix the "Variable $namespace is undefined" warning. But now this warning no longer occurs without this change (caused by the coding standard update?).
12. I commented "$k8s_cluster is unused variable" and removed this portion from my patch.
13. I commented "$key is unused variable" and removed this portion from my patch.
14. This change fixes the "exceptions should not be translated" warning. I added a comment to the code.
15. This change fixes the "exceptions should not be translated" warning. I added a comment to the code.
16. No update.
17. I removed this line.
18. Yes, the line was duplicated. I deleted one.
19. No update.
20. It depends on a reply from guan-san.
21. No update.
22. This change fixes the "exceptions should not be translated" warning. I added a comment to the code.
23. No update.
24. No update.
Comment #40
onotm commented@xiaohua-guan
Thank you for your comments.
Cloud you please check 20?
Comment #42
onotm commentedI fixed errors of the previous patch.
The cause of these errors is that k8s_form_cloud_project_k8s_form_submit has been removed.
Comment #43
yas@onotm
Thank you for the update. I think we can refactor the following code:
FROM:
if (!empty($namespace) && !empty($link_data['route_parameters']['k8s_namespace'])) {TO:
if (!empty($link_data['route_parameters']['k8s_namespace'])) {What do you think?
Comment #44
xiaohua guan commentedComment #45
xiaohua guan commentedComment #46
xiaohua guan commented@yas
I agreed with you. The code "empty($namespace)" can be removed.
Comment #47
onotm commented@yas @xiaohua-guan
Thank you for your comments.
I updated my patch.
Comment #48
onotm commentedComment #49
yas@onotm
Thank you for the update. It is getting closer to finalize.
@masami
Can we delete the following variables?
Comment #50
masami commented@yas
@onotm
They can be deleted.
Comment #51
yas@masami
Thank you for your confirmation.
@onotm
Could you please update the patch?
Comment #52
onotm commented@yas @masami
Thank you. I updated the patch.
Comment #53
yas@onotm
Thank you for the update.
@masami
I think we can remove those variables but can we delete entire code? Please let us re-confirm.
Comment #54
masami commented@yas
These code move to K8sBlockTrait, so they can be removed.
Comment #55
yas@masami
Thank you for your confirmation.
@all
What do you think?
Comment #56
MasatoTakada commented@Onotomo-san @yas
It looks good to me in my part No12.
Comment #57
baldwinlouie commented@all, patch looks good.
Comment #58
yas@all
Thank you for your review.
@onotm
I'll merge the patch --- Could you please create the patch for
8.x-1.xand8.x-2.x?Comment #59
onotm commented@yas
I create the patch for 8.x-1.x and 8.x-2.x and update the patch for 3.x.
Comment #60
yas@onotm
Thank you for the update and your extra efforts. I'll merge the patch to
8.x-1.x,8.x-2.xand3.xand close this issue asFixed.Comment #64
yas