Skip to content

Commit

Permalink
PCH Refactor: Refactor the external services (#2873)
Browse files Browse the repository at this point in the history
* Implement the new Content API service, and remove old RemoteAPI code

* Implement caching mechanism for service endpoints

* Implement the Suggestions API service

* Address PHPCS & PHPStan errors and warnings

* Fix post-merge issues and namespaces

* Add condition when validate api credentials returns false.

* Address code review feedback

* Adjust some DocBlocks and whitespace

* Make the services base URL static, and remove the old consts

* Fix PHPStan (not including tests)

* Fix misplaced `@since` tag

---------

Co-authored-by: Alex Cicovic <[email protected]>
  • Loading branch information
vaurdan and acicovic authored Oct 21, 2024
1 parent 3e1efb7 commit 0a653e8
Show file tree
Hide file tree
Showing 50 changed files with 2,256 additions and 1,577 deletions.
4 changes: 2 additions & 2 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
</properties>
</rule>

<!-- Allow short @var assignments in tests. -->
<!-- Allow short @var assignments -->
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>/tests/</exclude-pattern>
<exclude-pattern>/</exclude-pattern>
</rule>

</ruleset>
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
- vendor/php-stubs/wordpress-tests-stubs/wordpress-tests-stubs.php
type_coverage:
return_type: 91
return_type: 90
param_type: 79.2
property_type: 0 # We can't use property types until PHP 7.4 becomes the plugin's minimum version.
print_suggestions: false
Expand Down
194 changes: 0 additions & 194 deletions src/Endpoints/class-base-endpoint.php

This file was deleted.

45 changes: 0 additions & 45 deletions src/RemoteAPI/class-analytics-post-detail-api.php

This file was deleted.

107 changes: 0 additions & 107 deletions src/RemoteAPI/class-analytics-posts-api.php

This file was deleted.

Loading

0 comments on commit 0a653e8

Please sign in to comment.