Skip to content

Conversation

@markkelnar
Copy link
Contributor

@markkelnar markkelnar commented Jul 25, 2023

Add PHP static analyzer to run in github workflow action.

closes #232

$key,
is_array( $data ) ? $data : $data->toArray(),
$this->group_name,
// phpcs:ignore WordPressVIPMinimum.Performance.LowExpiryCacheTime.CacheTimeUndetermined
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sure there are ways to satisfy phpcs on this $expire paramter. Or just ignore the warning and move on.

@markkelnar markkelnar requested a review from jasonbahl July 26, 2023 13:35
Copy link
Collaborator

@jasonbahl jasonbahl left a comment

Choose a reason for hiding this comment

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

@markkelnar sweet!

I confirmed this is working by pulling the repo locally, running composer install, then running composer phpstan.

I was able to "break" it by going to Results.php and adding a call to a non-existing method: $this->test() and I saw the following output:

CleanShot 2023-07-27 at 16 49 30

Now we can start working toward higher levels!

@jasonbahl jasonbahl merged commit 4c0b73c into wp-graphql:main Jul 27, 2023
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.

Implement PHPStan

2 participants