jigish.addweb created an issue. See original summary.
@jigishaddweb
Thank you for adding the feature. Could you please refactor the following code?
FROM:
--- a/modules/cloud_service_providers/k8s/src/Service/K8sServiceMock.php +++ b/modules/cloud_service_providers/k8s/src/Service/K8sServiceMock.php @@ -610,4 +610,32 @@ class K8sServiceMock extends K8sService { return json_decode($this->config->get('k8s_mock_data'), TRUE)['deleteIngress']; } + /** + * {@inheritdoc} + */ + public function getEndpoints(array $params = []) { + return json_decode($this->config->get('k8s_mock_data'), TRUE)['getEndpoints']; + }
TO:
+ public function getEndpoints(array $params = []) { + return json_decode($this->config->get('k8s_mock_data'), TRUE)['getEndpoints'] ?? []; + }
Based on the patch 3104511-4.patch, could you please respect the following code style?
isset($a) ? $a : $b or !empty($a) ? $a : $b
isset($a) ? $a : $b
!empty($a) ? $a : $b
$var ?? $b
Thanks
Could you please also follow the code based on the patch at 3104742-2.patch?
@yas Thank you for reviewing the patch. I have updated the code as per your comment. Please test the patch and let me know if need further changes.
Thank you for the update. It looks good to me now. I'll merge the patch to 8.x-2.x and close this issue as Fixed.
8.x-2.x
Fixed
Issue #3103927 by jigish.addweb, yas: Manage K8s Endpoints
Automatically closed - issue fixed for 2 weeks with no activity.
Comments
Comment #2
jigish.addweb commentedComment #3
yas@jigishaddweb
Thank you for adding the feature. Could you please refactor the following code?
FROM:
TO:
Comment #4
yasComment #5
yasComment #6
yasComment #7
yas@jigishaddweb
Based on the patch 3104511-4.patch, could you please respect the following code style?
FROM:
isset($a) ? $a : $bor!empty($a) ? $a : $bTO:
$var ?? $bThanks
Comment #8
yas@jigishaddweb
Could you please also follow the code based on the patch at 3104742-2.patch?
Comment #9
jigish.addweb commented@yas
Thank you for reviewing the patch. I have updated the code as per your comment.
Please test the patch and let me know if need further changes.
Comment #10
jigish.addweb commentedComment #11
yas@jigishaddweb
Thank you for the update. It looks good to me now. I'll merge the patch to
8.x-2.xand close this issue asFixed.Comment #13
yas