Skip to content

PHPCS fixes #3

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

abhijitrakas
Copy link

No description provided.

if ( class_exists( 'WP_CLI' ) ) {
\WP_CLI::success( "Successfully created {$created} command pages." );
\WP_CLI::success( sprintf( 'Successfully created %s command pages.', $created ) );

Choose a reason for hiding this comment

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

Suggested change
\WP_CLI::success( sprintf( 'Successfully created %s command pages.', $created ) );
\WP_CLI::success( "Successfully created {$created} command pages." );

Why is current implementation changed? Current code is clearer.

'post_type' => $this->post_type,
'post_parent' => $parent_page_id,
'posts_per_page' => 200,
'posts_per_page' => 200, // phpcs:ignore

Choose a reason for hiding this comment

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

Why is it ignored? Add comment with specific rule.

Copy link
Author

Choose a reason for hiding this comment

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

This actually throughs warning.

Screenshot 2019-06-12 at 12 08 04 PM

While running PHPCS I am not getting any specific rule with a warning (Please check above screenshot). Any idea how do I get a specific rule to ignore?

public function ee_wpghs_whitelisted_post_types( $supported_post_types ) {

return [
'handbook',

Choose a reason for hiding this comment

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

Could we use $this->post_type here and other instances where possible ?

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.

2 participants