Problem/Motivation

  • Openstack Overhaul refactoring

Issue fork cloud-3195312

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

jigish.addweb created an issue. See original summary.

jigish.addweb’s picture

Status: Active » Needs review
StatusFileSize
new6.02 KB
yas’s picture

Status: Needs review » Needs work

@jigishaddweb

Could you please also refactor the following?

$ cd /var/www/html; phpcs --standard=DrupalPractice --extensions=js,json,php,module,inc,install,test,profile,theme,css,info,txt,md,yml /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/

FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Controller/ApiController.php
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
375 | WARNING | Unused variable $openstack_ec2_api.
------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Form/OpenStackSecurityGroupEditForm.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------
198 | WARNING | Unused variable $key.
208 | WARNING | Unused variable $key.
-----------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Form/OpenStackFloatingIpCreateForm.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
152 | WARNING | Unused variable $entity.
----------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Form/OpenStackInstanceEditForm.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
382 | WARNING | Unused private method getAvailableFloatingIps()
------------------------------------------------------------------------------------------------------------------------------

FILE: .../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
------------------------------------------------------------------------------------------------------------------------------------------------------
308 | WARNING | Unused variable $group_key.
------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Service/Rest/OpenStackService.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 14 WARNINGS AFFECTING 14 LINES
-----------------------------------------------------------------------------------------------------------------------------
274 | WARNING | Unused variable $volume_key.
296 | WARNING | Unused variable $port_key.
301 | WARNING | Unused variable $address_key.
302 | WARNING | Unused variable $add_key.
376 | WARNING | Unused variable $volume_key.
398 | WARNING | Unused variable $port_key.
403 | WARNING | Unused variable $address_key.
404 | WARNING | Unused variable $add_key.
1398 | WARNING | Unused variable $key_rules.
1653 | WARNING | Unused variable $results.
1829 | WARNING | Unused variable $subnet_key.
1889 | WARNING | Unused variable $subnet_key.
1947 | WARNING | Unused variable $subnet_key.
2212 | WARNING | Unused variable $key.
-----------------------------------------------------------------------------------------------------------------------------

Time: 3.28 secs; Memory: 34MB

jigish.addweb’s picture

Status: Needs work » Needs review
StatusFileSize
new16.28 KB

@yas

Thank you for your review.

I've resolved all coding standard violations.

Please review the updated patch.

Thanks

yas’s picture

Status: Needs review » Needs work

@jigishaddweb

Thank you for the update. Please check https://git.drupalcode.org/project/cloud/-/merge_requests/128#note_10525 and the others for the key-value pair as a foreach loop variable.

Thanks

binoli.addweb made their first commit to this issue’s fork.

jigish.addweb’s picture

StatusFileSize
new25.91 KB
jigish.addweb’s picture

Status: Needs work » Needs review
yas’s picture

Status: Needs review » Reviewed & tested by the community

@jigishaddweb @binoliaddwebThank you for the refactoring.

I'll merge the patch to 3.x and close this issue as Fixed.

  • yas committed 251a05b on 3.x authored by jigish.addweb
    Issue #3195312 by jigish.addweb, binoli.addweb, yas: Openstack Overhaul...
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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