Skip to content

Commit 0028297

Browse files
committed
Updated PHPStan Rules to commit f53885876b1c69260a2f68f7b3d853472e3d0d40
deprecated-packages/symplify@f538858 [PhpConfigPrinter] Remove astral dependency (#4324)
1 parent 2c20aef commit 0028297

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323

2424
# prepare local files
2525
- run: wget https://raw.githubusercontent.com/symplify/phpstan-rules/main/phpstan-for-tests.neon
26-
- run: wget https://raw.githubusercontent.com/symplify/phpstan-rules/main/src-for-tests/SomeClass.php
26+
- run: wget https://raw.githubusercontent.com/symplify/phpstan-rules/main/tests/SomeClass.php.inc.inc
2727

28-
- run: vendor/bin/phpstan analyze SomeClass.php --configuration phpstan-for-tests.neon
28+
- run: vendor/bin/phpstan analyze SomeClass.php.inc.inc --configuration phpstan-for-tests.neon
2929

3030

3131

src/NodeFinder/TypeAwareNodeFinder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66

77
use PhpParser\Node;
88
use PhpParser\NodeFinder;
9-
use Symplify\PHPStanRules\Finder\class;
109

10+
/**
11+
* @todo remove after https://github.com/nikic/PHP-Parser/pull/869 is released
12+
*/
1113
final class TypeAwareNodeFinder
1214
{
1315
/**

src/Rules/ForbiddenTestsNamespaceOutsideTestsDirectoryRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getRuleDefinition(): RuleDefinition
7474
return new RuleDefinition(self::DESCRIPTION, [
7575
new CodeSample(
7676
<<<'CODE_SAMPLE'
77-
// file path: "src/SomeClass.php
77+
// file path: "src/SomeClass.php"
7878
7979
namespace App\Tests;
8080
@@ -84,7 +84,7 @@ class SomeClass
8484
CODE_SAMPLE
8585
,
8686
<<<'CODE_SAMPLE'
87-
// file path: "tests/SomeClass.php
87+
// file path: "tests/SomeClass.php"
8888
8989
namespace App\Tests;
9090

tests/SomeClass.php.inc

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+
final class SomeClass
6+
{
7+
private string $name = 'not empty class';
8+
9+
public function getName(): string
10+
{
11+
return $this->name;
12+
}
13+
}

0 commit comments

Comments
 (0)