Skip to content

PHPCS fixes#3

Open
abhijitrakas wants to merge 4 commits into
EasyEngine:masterfrom
abhijitrakas:feature/phpcs-fixes
Open

PHPCS fixes#3
abhijitrakas wants to merge 4 commits into
EasyEngine:masterfrom
abhijitrakas:feature/phpcs-fixes

Conversation

@abhijitrakas
Copy link
Copy Markdown

No description provided.

Comment thread inc/class-markdown-hb-import.php Outdated

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

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
Copy link
Copy Markdown

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
Copy Markdown
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?

Comment thread post-types/class-post-type-handbook.php Outdated
public function ee_wpghs_whitelisted_post_types( $supported_post_types ) {

return [
'handbook',
Copy link
Copy Markdown

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