Skip to content

Commit 029806f

Browse files
committed
style(share): disable PHPCS array alignment for networks map
Wrap $networks with phpcs:disable/enable for MultipleStatementAlignment to avoid local vs CI column drift on mixed multiline array items.
1 parent d501808 commit 029806f

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎inc/Helpers/Formatting/Share.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ function get_share_link( string $name, string $link_to_share, array $share_attri
4747
return '';
4848
}
4949

50+
// phpcs:disable WordPress.Arrays.MultipleStatementAlignment -- multiline "attributes" + short keys; PHPCS alignment drifts with tab width (local vs CI).
5051
$networks = [
5152
'facebook' => [
5253
'attributes' => [
@@ -115,6 +116,7 @@ function get_share_link( string $name, string $link_to_share, array $share_attri
115116
],
116117
],
117118
];
119+
// phpcs:enable WordPress.Arrays.MultipleStatementAlignment
118120

119121
// 1 . Le réseau existe ?
120122
$network = $networks[ $name ] ?? [];

‎phpcs.xml.dist‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,4 @@
6969

7070
<rule ref="PHPCompatibilityWP"/>
7171
<config name="testVersion" value="8.3-"/>
72-
73-
<!-- Match WordPress / local editor: same value as arg tab-width (see PHPCS Config). -->
74-
<config name="tab_width" value="4"/>
7572
</ruleset>

0 commit comments

Comments
 (0)