Skip to content

Commit

Permalink
Update PunctuationSpacingRule
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Nov 5, 2024
1 parent 1f56465 commit 1bae4a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Rules/Punctuation/PunctuationSpacingRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ final class PunctuationSpacingRule extends AbstractSpacingRule implements Config
'.' => 0,
',' => 0,
'|' => 0,
'?:' => 0,
];
private const DEFAULT_SPACE_AFTER = [
'(' => 0,
Expand All @@ -32,6 +33,7 @@ final class PunctuationSpacingRule extends AbstractSpacingRule implements Config
'|' => 0,
':' => 1,
',' => 1,
'?:' => 1,
];

/** @var array<string, int|null> */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
{{ a|trans }}
{{ [{a: 1,},] }}
{{ 'test'[1:2] }}
{% types {foo: 'int', bar?: 'string'} %}
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
{{ a | trans }}
{{ [{a: 1, }, ] }}
{{ 'test'[1:2] }}
{% types {foo: 'int', bar?: 'string'} %}

0 comments on commit 1bae4a8

Please sign in to comment.