Skip to content

Commit

Permalink
Merge pull request #291 from missionmike/fix/phpcbf-whitespace
Browse files Browse the repository at this point in the history
fix: restore whitespace rules for PHPCBF
  • Loading branch information
josephfusco authored Aug 29, 2024
2 parents b3fec03 + e03ad79 commit 7300dce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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

0 comments on commit 7300dce

Please sign in to comment.