Skip to content

Commit 0307214

Browse files
committed
Rename what should not be GNSR
1 parent dca8553 commit 0307214

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverRuleTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ static function (Node $node, Scope $scope) {
7676
$arg0 = $scope->getType($node->getArgs()[0]->value); // on purpose to hit the cache
7777

7878
return [
79-
RuleErrorBuilder::message($arg0->describe(VerbosityLevel::precise()))->identifier('gnsr.rule')->build(),
80-
RuleErrorBuilder::message($scope->getType($node->getArgs()[1]->value)->describe(VerbosityLevel::precise()))->identifier('gnsr.rule')->build(),
81-
RuleErrorBuilder::message($scope->getType($node->getArgs()[2]->value)->describe(VerbosityLevel::precise()))->identifier('gnsr.rule')->build(),
79+
RuleErrorBuilder::message($arg0->describe(VerbosityLevel::precise()))->identifier('fnsr.rule')->build(),
80+
RuleErrorBuilder::message($scope->getType($node->getArgs()[1]->value)->describe(VerbosityLevel::precise()))->identifier('fnsr.rule')->build(),
81+
RuleErrorBuilder::message($scope->getType($node->getArgs()[2]->value)->describe(VerbosityLevel::precise()))->identifier('fnsr.rule')->build(),
8282
];
8383
},
8484
[
@@ -97,8 +97,8 @@ static function (Node $node, Scope $scope) {
9797
$synthetic2 = $scope->getType(new Node\Scalar\String_('bar'));
9898

9999
return [
100-
RuleErrorBuilder::message($synthetic->describe(VerbosityLevel::precise()))->identifier('gnsr.rule')->build(),
101-
RuleErrorBuilder::message($synthetic2->describe(VerbosityLevel::precise()))->identifier('gnsr.rule')->build(),
100+
RuleErrorBuilder::message($synthetic->describe(VerbosityLevel::precise()))->identifier('fnsr.rule')->build(),
101+
RuleErrorBuilder::message($synthetic2->describe(VerbosityLevel::precise()))->identifier('fnsr.rule')->build(),
102102
];
103103
},
104104
[

tests/PHPStan/Analyser/Fiber/FiberNodeScopeResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FiberNodeScopeResolverTest extends TypeInferenceTestCase
2525

2626
public static function dataFileAsserts(): iterable
2727
{
28-
yield from self::gatherAssertTypes(__DIR__ . '/data/gnsr.php');
28+
yield from self::gatherAssertTypes(__DIR__ . '/data/fnsr.php');
2929
}
3030

3131
/**

tests/PHPStan/Analyser/Fiber/data/gnsr.php renamed to tests/PHPStan/Analyser/Fiber/data/fnsr.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types = 1);
44

5-
namespace GeneratorNodeScopeResolverTest;
5+
namespace FiberNodeScopeResolverTest;
66

77
use Closure;
88
use DivisionByZeroError;
@@ -369,9 +369,9 @@ class FooWithStaticMethods
369369

370370
public function doFoo(): void
371371
{
372-
assertType('GeneratorNodeScopeResolverTest\\FooWithStaticMethods', self::returnSelf());
373-
assertNativeType('GeneratorNodeScopeResolverTest\\FooWithStaticMethods', self::returnSelf());
374-
assertType('GeneratorNodeScopeResolverTest\\FooWithStaticMethods', self::returnPhpDocSelf());
372+
assertType('FiberNodeScopeResolverTest\\FooWithStaticMethods', self::returnSelf());
373+
assertNativeType('FiberNodeScopeResolverTest\\FooWithStaticMethods', self::returnSelf());
374+
assertType('FiberNodeScopeResolverTest\\FooWithStaticMethods', self::returnPhpDocSelf());
375375
assertNativeType('mixed', self::returnPhpDocSelf());
376376
}
377377

@@ -402,7 +402,7 @@ public function doFoo2(): void
402402
{
403403
assertType('1', self::genericStatic(1));
404404

405-
$s = 'GeneratorNodeScopeResolverTest\\FooWithStaticMethods';
405+
$s = 'FiberNodeScopeResolverTest\\FooWithStaticMethods';
406406
assertType('1', $s::genericStatic(1));
407407
}
408408

@@ -450,7 +450,7 @@ public function __construct($a)
450450

451451
function (): void {
452452
$foo = new FooGeneric(5);
453-
assertType('GeneratorNodeScopeResolverTest\\FooGeneric<int>', $foo);
453+
assertType('FiberNodeScopeResolverTest\\FooGeneric<int>', $foo);
454454
};
455455

456456
function (): void {
@@ -469,11 +469,11 @@ function doFoo(): void {
469469
assertType('literal-string&non-falsy-string', __DIR__);
470470
assertType('literal-string&non-falsy-string', __FILE__);
471471
assertType('471', __LINE__);
472-
assertType("'GeneratorNodeScopeResolverTest'", __NAMESPACE__);
473-
assertType("'GeneratorNodeScopeResolverTest\\\\MagicConstUser'", __CLASS__);
472+
assertType("'FiberNodeScopeResolverTest'", __NAMESPACE__);
473+
assertType("'FiberNodeScopeResolverTest\\\\MagicConstUser'", __CLASS__);
474474
assertType("''", __TRAIT__);
475475
assertType("'doFoo'", __FUNCTION__);
476-
assertType("'GeneratorNodeScopeResolverTest\\\\MagicConstUser::doFoo'", __METHOD__);
476+
assertType("'FiberNodeScopeResolverTest\\\\MagicConstUser::doFoo'", __METHOD__);
477477
assertType("''", __PROPERTY__);
478478
}
479479
}

0 commit comments

Comments
 (0)