Skip to content

Commit 35b1b91

Browse files
Disallow multiple classes per file (#40) (#40)
1 parent 4539a73 commit 35b1b91

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/RulesTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ final class RulesTest extends TestCase
3030
// PHPCS doesn't seem to have a rule for heredoc/nowdoc indentation
3131
['NowdocNotIndented.php', 'phpcs'],
3232
['HeredocNotIndented.php', 'phpcs'],
33+
// PHP CS Fixer has no rule for multiple classes per file
34+
['multiple-classes-per-file.php', 'php-cs-fixer'],
3335
];
3436

3537
private static function phpCsFixerCommand(string $file): string
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Invalid;
6+
7+
class Foo
8+
{
9+
}
10+
11+
class Bar
12+
{
13+
}

0 commit comments

Comments
 (0)