Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: restore whitespace rules for PHPCBF #291

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,14 @@
<!-- Enforce short array syntax -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>

<!-- These formatting rules are suppressed in VIP-GO and restored here.-->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<severity>5</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
<severity>5</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
<severity>5</severity>
</rule>
</ruleset>
4 changes: 2 additions & 2 deletions src/Admin/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public function admin_init() {
public function untrashed_post_cb( $post_id, $previous_status ) {
// If have errors when validating the post content/data, do not show those in the admin when untrash.
$untrashed_post = get_post( $post_id );

// Bail if the untrashed post is not a GraphQL Document
if ( ! isset( $untrashed_post->post_type ) || Document::TYPE_NAME !== $untrashed_post->post_type ) {
return;
}

delete_transient( AdminErrors::TRANSIENT_NAME );
}

Expand Down
Loading