Skip to content

Commit 7300dce

Browse files
authored
Merge pull request #291 from missionmike/fix/phpcbf-whitespace
fix: restore whitespace rules for PHPCBF
2 parents b3fec03 + e03ad79 commit 7300dce

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.phpcs.xml.dist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,14 @@
109109
<!-- Enforce short array syntax -->
110110
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
111111

112+
<!-- These formatting rules are suppressed in VIP-GO and restored here.-->
113+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
114+
<severity>5</severity>
115+
</rule>
116+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
117+
<severity>5</severity>
118+
</rule>
119+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
120+
<severity>5</severity>
121+
</rule>
112122
</ruleset>

src/Admin/Editor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public function admin_init() {
4646
public function untrashed_post_cb( $post_id, $previous_status ) {
4747
// If have errors when validating the post content/data, do not show those in the admin when untrash.
4848
$untrashed_post = get_post( $post_id );
49-
49+
5050
// Bail if the untrashed post is not a GraphQL Document
5151
if ( ! isset( $untrashed_post->post_type ) || Document::TYPE_NAME !== $untrashed_post->post_type ) {
5252
return;
5353
}
54-
54+
5555
delete_transient( AdminErrors::TRANSIENT_NAME );
5656
}
5757

0 commit comments

Comments
 (0)