Problem/Motivation
- Run a drupal-rector analysis
./vendor/bin/rector process web/modules/contrib/cloud --dry-runon the module will show:
1) web/modules/contrib/cloud/modules/cloud_service_providers/vmware/src/Controller/ApiController.php:88 ---------- begin diff ---------- @@ @@ * * @var array */ - protected $configuration; + protected $configuration = ['cloud_context' => '']; /** * The current user. @@ @@ $this->database = $database; $this->cloudService = $cloud_service; $this->currentUser = $current_user; - $this->configuration = ['cloud_context' => '']; } /** ----------- end diff ----------- Applied rules: * InlineConstructorDefaultToPropertyRector 2) web/modules/contrib/cloud/modules/cloud_service_providers/k8s/src/Controller/ApiController.php:110 ---------- begin diff ---------- @@ @@ * * @var array */ - private $configuration; + private $configuration = ['cloud_context' => '']; /** * The cloud service provider plugin manager (CloudConfigPluginManager). @@ @@ $this->cloudStorePluginManager = $plugin_manager; $this->cloudService = $cloud_service; $this->currentUser = $current_user; - $this->configuration = ['cloud_context' => '']; $this->cloudConfigPluginManager = $cloud_config_plugin_manager; } ----------- end diff ----------- Applied rules: * InlineConstructorDefaultToPropertyRector 3) web/modules/contrib/cloud/modules/cloud_service_providers/openstack/src/Controller/ApiController.php:88 ---------- begin diff ---------- @@ @@ * * @var array */ - protected $configuration; + protected $configuration = ['cloud_context' => '']; /** * The current user. @@ @@ $this->renderer = $renderer; $this->cloudService = $cloud_service; $this->currentUser = $current_user; - $this->configuration = ['cloud_context' => '']; $this->openStackOperationsService = $openstack_operations_service; $this->openStackService = $openstack_service; $this->httpClient = $http_client; ----------- end diff ----------- Applied rules: * InlineConstructorDefaultToPropertyRector 4) web/modules/contrib/cloud/modules/cloud_service_providers/aws_cloud/src/Controller/Ec2/ApiController.php:124 ---------- begin diff ---------- @@ @@ * * @var array */ - protected $configuration; + protected $configuration = ['cloud_context' => '']; /** * ApiController constructor. @@ @@ $this->cloudService = $cloud_service; $this->entityTypeManager = $entity_type_manager; $this->currentUser = $current_user; - $this->configuration = ['cloud_context' => '']; } /** ----------- end diff ----------- Applied rules: * InlineConstructorDefaultToPropertyRector
Proposed resolution
Fix the warnings.
| Comment | File | Size | Author |
|---|
Issue fork cloud-3400408
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
Comment #2
mukhtarm commentedPlease review the patch.
Comment #3
yas@mukhtarm
Thank you for providing the patch. Can you create the MR rather than the patch file? Thanks!
Comment #5
mukhtarm commentedPlease review the MR. thanks
Comment #6
yas@mukhtarm
Thank you for creating the MR. I'll merge the patch to
5.xand6.x, and close this issue as Fixed.Comment #9
yas