Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: refactor plugin instantiation #86

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

justlevine
Copy link
Member

What

This PR refactors the plugin instantiation. More specifically:

  • fix: Plugin versions in dependency check logic is now in sync with the actual plugin version requirements.
  • chore!: Add WPGraphQL/RankMath namespace to root-level files: activation.php, deactivation.php, wp-graphql-rank-math.php, and cleanup the internal methods.
  • chore: Move autoloader logic to Autoloader class.

Why

How

Testing Instructions

Additional Info

Checklist:

  • My code is tested to the best of my abilities.
  • My code follows the WordPress Coding Standards.
  • My code has proper inline documentation.
  • I have added unit tests to verify the code works as intended.
  • The changes in this PR have been noted in CHANGELOG.md

/**
* Initializes plugin.
*/
function init(): void {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method init has 54 lines of code (exceeds 25 allowed). Consider refactoring.

*
* @return array<string, string> List of dependencies that are not ready.
*/
function dependencies_not_ready(): array {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function dependencies_not_ready has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.

@justlevine justlevine merged commit a884694 into AxeWP:develop Apr 6, 2024
21 of 25 checks passed
@justlevine justlevine deleted the chore/refactor-entrypoint branch April 6, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant