Skip to content

Commit

Permalink
Enable PHP CS Fixer's concat_space rule (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
MidnightDesign authored Jul 9, 2024
1 parent 0774f4a commit 43b50e0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions php-cs-fixer-rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
'method' => 'one',
],
],
'concat_space' => [
'spacing' => 'one',
],
'declare_strict_types' => true,
'fully_qualified_strict_types' => true,
'function_declaration' => [
Expand Down
5 changes: 5 additions & 0 deletions tests/fixtures/invalid/extra-space-after-concat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

declare(strict_types=1);

echo 'foo' . 'bar';
5 changes: 5 additions & 0 deletions tests/fixtures/invalid/extra-space-before-concat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

declare(strict_types=1);

echo 'foo' . 'bar';
5 changes: 5 additions & 0 deletions tests/fixtures/invalid/no-space-after-concat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

declare(strict_types=1);

echo 'foo' .'bar';
5 changes: 5 additions & 0 deletions tests/fixtures/invalid/no-space-before-concat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

declare(strict_types=1);

echo 'foo'. 'bar';
5 changes: 5 additions & 0 deletions tests/fixtures/valid/spaces-around-concat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

declare(strict_types=1);

echo 'foo' . 'bar';

0 comments on commit 43b50e0

Please sign in to comment.