apigee / apigee-client-php

Client library to make API calls to Apigee Edge Management API
Apache License 2.0
27 stars 30 forks source link

Changes for PHPCS Fixes #380

Closed kedarkhaire closed 3 days ago

kedarkhaire commented 1 week ago

PHPCS fix includes the following fixes

  1. Use statement sort in alphabetically order
  2. Parameter has null default value, but is not marked as nullable.
  3. Fix fully_qualified_strict_type, global_namespace_import, phpdoc_separation, ordered_imports
codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 84.44444% with 21 lines in your changes missing coverage. Please review.

Project coverage is 86.85%. Comparing base (a56e3fe) to head (fe9d16e). Report is 1 commits behind head on 3.x.

Files with missing lines Patch % Lines
src/Api/Management/Controller/AppController.php 0.00% 5 Missing :warning:
src/Api/ApigeeX/Controller/AppController.php 0.00% 4 Missing :warning:
.../Management/Controller/AppCredentialController.php 50.00% 3 Missing :warning:
src/PropertyAccess/PropertyAccessorDecorator.php 71.42% 2 Missing :warning:
src/Structure/KeyValueMap.php 0.00% 2 Missing :warning:
...c/Api/ApigeeX/Controller/AppGroupAppController.php 0.00% 1 Missing :warning:
...ApigeeX/Controller/PaginatedListingHelperTrait.php 0.00% 1 Missing :warning:
src/Api/Management/Entity/Organization.php 0.00% 1 Missing :warning:
src/Exception/CpsNotEnabledException.php 0.00% 1 Missing :warning:
src/Serializer/JsonDecode.php 50.00% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=ga5VZb9aAy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee)](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee) ```diff @@ Coverage Diff @@ ## 3.x #380 +/- ## ============================================ + Coverage 86.81% 86.85% +0.03% Complexity 1768 1768 ============================================ Files 349 349 Lines 4643 4641 -2 ============================================ Hits 4031 4031 + Misses 612 610 -2 ``` | [Flag](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee) | `86.85% <84.44%> (+0.03%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee) | Coverage Δ | | |---|---|---| | [.../ApigeeX/Controller/AcceptedRatePlanController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FAcceptedRatePlanController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvQWNjZXB0ZWRSYXRlUGxhbkNvbnRyb2xsZXIucGhw) | `86.48% <100.00%> (ø)` | | | [...rc/Api/ApigeeX/Controller/ApiProductController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FApiProductController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvQXBpUHJvZHVjdENvbnRyb2xsZXIucGhw) | `80.00% <ø> (ø)` | | | [...rc/Api/ApigeeX/Controller/AppByOwnerController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FAppByOwnerController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvQXBwQnlPd25lckNvbnRyb2xsZXIucGhw) | `100.00% <100.00%> (ø)` | | | [...eeX/Controller/AppGroupAppCredentialController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FAppGroupAppCredentialController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvQXBwR3JvdXBBcHBDcmVkZW50aWFsQ29udHJvbGxlci5waHA=) | `100.00% <ø> (ø)` | | | [...pigeeX/Controller/AppGroupAwareControllerTrait.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FAppGroupAwareControllerTrait.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvQXBwR3JvdXBBd2FyZUNvbnRyb2xsZXJUcmFpdC5waHA=) | `0.00% <ø> (ø)` | | | [src/Api/ApigeeX/Controller/AppGroupController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FAppGroupController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvQXBwR3JvdXBDb250cm9sbGVyLnBocA==) | `100.00% <100.00%> (ø)` | | | [...c/Api/ApigeeX/Controller/BillingTypeController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FBillingTypeController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvQmlsbGluZ1R5cGVDb250cm9sbGVyLnBocA==) | `100.00% <ø> (ø)` | | | [...Controller/DeveloperAcceptedRatePlanController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FDeveloperAcceptedRatePlanController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvRGV2ZWxvcGVyQWNjZXB0ZWRSYXRlUGxhbkNvbnRyb2xsZXIucGhw) | `64.70% <ø> (ø)` | | | [...geeX/Controller/DeveloperBillingTypeController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FDeveloperBillingTypeController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvRGV2ZWxvcGVyQmlsbGluZ1R5cGVDb250cm9sbGVyLnBocA==) | `100.00% <ø> (ø)` | | | [...X/Controller/DeveloperPrepaidBalanceController.php](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree&filepath=src%2FApi%2FApigeeX%2FController%2FDeveloperPrepaidBalanceController.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee#diff-c3JjL0FwaS9BcGlnZWVYL0NvbnRyb2xsZXIvRGV2ZWxvcGVyUHJlcGFpZEJhbGFuY2VDb250cm9sbGVyLnBocA==) | `100.00% <ø> (ø)` | | | ... and [211 more](https://app.codecov.io/gh/apigee/apigee-client-php/pull/380?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apigee) | |
kedarkhaire commented 1 week ago

Following commands were used to analyze and fix the PHPCS issues and then check the flow again.

  1. Report code style issues that can not be fixed automatically - composer check-style
  2. Automatically fix code style issues - composer fix-style
  3. Check for errors with the static code-analysis tool post above changes - composer analyze
  4. Run PHPUnit tests to check all the test-cases are running well post above changes - composer test

Thanks!