Skip to content

Commit bf93fec

Browse files
committed
cleanup some names
1 parent 2459c74 commit bf93fec

File tree

7 files changed

+74
-24
lines changed

7 files changed

+74
-24
lines changed

tests/rules/Fixtures/NamingConventionFixture.php renamed to tests/rules/Fixtures/NamingConvention/AbstractCorrectClass.php

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,7 @@
66
*/
77
declare(strict_types=1);
88

9-
namespace Ibexa\Tests\PHPStan\Rules\Fixtures;
10-
11-
interface WrongName
12-
{
13-
}
14-
15-
interface CorrectNameInterface
16-
{
17-
}
18-
19-
trait SimpleThing
20-
{
21-
}
22-
23-
trait CorrectNameTrait
24-
{
25-
}
26-
27-
abstract class SimpleClass
28-
{
29-
}
9+
namespace Ibexa\Tests\PHPStan\Rules\Fixtures\NamingConvention;
3010

3111
abstract class AbstractCorrectClass
3212
{
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Ibexa\Tests\PHPStan\Rules\Fixtures\NamingConvention;
10+
11+
interface CorrectNameInterface
12+
{
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Ibexa\Tests\PHPStan\Rules\Fixtures\NamingConvention;
10+
11+
trait CorrectNameTrait
12+
{
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Ibexa\Tests\PHPStan\Rules\Fixtures\NamingConvention;
10+
11+
abstract class SimpleClass
12+
{
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Ibexa\Tests\PHPStan\Rules\Fixtures\NamingConvention;
10+
11+
trait SimpleThing
12+
{
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Ibexa\Tests\PHPStan\Rules\Fixtures\NamingConvention;
10+
11+
interface WrongName
12+
{
13+
}

tests/rules/NamingConventionRuleTest.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ public function testRule(): void
2626
{
2727
$this->analyse(
2828
[
29-
__DIR__ . '/Fixtures/NamingConventionFixture.php',
29+
__DIR__ . '/Fixtures/NamingConvention/WrongName.php',
30+
__DIR__ . '/Fixtures/NamingConvention/SimpleThing.php',
31+
__DIR__ . '/Fixtures/NamingConvention/SimpleClass.php',
32+
__DIR__ . '/Fixtures/NamingConvention/CorrectNameInterface.php',
33+
__DIR__ . '/Fixtures/NamingConvention/CorrectNameTrait.php',
34+
__DIR__ . '/Fixtures/NamingConvention/AbstractCorrectClass.php',
3035
],
3136
[
3237
[
@@ -35,11 +40,11 @@ public function testRule(): void
3540
],
3641
[
3742
'Trait "SimpleThing" should have "Trait" suffix',
38-
19,
43+
11,
3944
],
4045
[
4146
'Abstract class "SimpleClass" should have "Abstract" prefix',
42-
27,
47+
11,
4348
],
4449
]
4550
);

0 commit comments

Comments
 (0)