Skip to content

Commit

Permalink
update anonymous class references
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Apr 26, 2022
1 parent de301aa commit e3a7e64
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ parameters:

# internal tag
- '#Unknown PHPDoc tag\: @phpstan\-rule#'
- '#Cognitive complexity for "Rector\\TypeDeclaration\\PHPStan\\Type\\ObjectTypeSpecifier\:\:matchShortenedObjectType\(\)" is 14, keep it under 10#'

# many internal cases
- '#Calling (.*?) is not covered by backward compatibility promise\. The method might change in a minor PHPStan version#'
Expand Down Expand Up @@ -595,7 +594,8 @@ parameters:

# resolve later to collector
-
message: '#Class cognitive complexity is 55, keep it under 50#'
path: rules/TypeDeclaration/PHPStan/Type/ObjectTypeSpecifier.php
message: '#Class cognitive complexity is \d+, keep it under 50#'
path: rules/TypeDeclaration/PHPStan/ObjectTypeSpecifier.php

- '#Cognitive complexity for "Rector\\TypeDeclaration\\PHPStan\\Type\\ObjectTypeSpecifier\:\:narrowToFullyQualifiedOrAliasedObjectType\(\)" is \d+, keep it under 10#'
- '#Cognitive complexity for "Rector\\TypeDeclaration\\PHPStan\\ObjectTypeSpecifier\:\:matchShortenedObjectType\(\)" is \d+, keep it under 10#'
- '#Cognitive complexity for "Rector\\TypeDeclaration\\PHPStan\\ObjectTypeSpecifier\:\:narrowToFullyQualifiedOrAliasedObjectType\(\)" is \d+, keep it under 10#'
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class ClassExists
{
public function run()
{
return new Anonymous__8012caaa6db2848028c58729537f4951__0();
return new Anonymous__%s__0();
}
}
class Anonymous__8012caaa6db2848028c58729537f4951__0
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ trait ClassInTrait
{
$message = 'error';

$first = new Anonymous__3e394521acb7827bb92d281feff1e6ff__0($message);
$first = new Anonymous__%s__0($message);

$second = new Anonymous__3e394521acb7827bb92d281feff1e6ff__1();
$second = new Anonymous__%s__1();
}
}
class Anonymous__3e394521acb7827bb92d281feff1e6ff__0 extends \InvalidArgumentException
class Anonymous__%s__0 extends \InvalidArgumentException
{
}
class Anonymous__3e394521acb7827bb92d281feff1e6ff__1 extends \Exception
class Anonymous__%s__1 extends \Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class Fixture
{
public function run()
{
return new Anonymous__4ca3de28f19d52cd0bb75d0880ce939c__0();
return new Anonymous__%s__0();
}
}
class Anonymous__4ca3de28f19d52cd0bb75d0880ce939c__0
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ function () {
namespace Rector\Tests\DowngradePhp70\Rector\New_\DowngradeAnonymousClassRector\Fixture;

function () {
return new Anonymous__d746a33921816ede30ef66b0a30f1039__0();
return new Anonymous__%s__0();
};
class Anonymous__d746a33921816ede30ef66b0a30f1039__0
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function () {
<?php

function () {
return new Anonymous__c33a2ec76b5e9826cbdafb789ee4c8fb__0();
return new Anonymous__%s__0();
};
class Anonymous__c33a2ec76b5e9826cbdafb789ee4c8fb__0
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ namespace Rector\Tests\DowngradePhp70\Rector\New_\DowngradeAnonymousClassRector\

function inFunction()
{
return new Anonymous__a598eff560ff9cabff1daddf5afd8e31__0();
return new Anonymous__%s__0();
}
class Anonymous__a598eff560ff9cabff1daddf5afd8e31__0
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function inFunctionNoNamespace()

function inFunctionNoNamespace()
{
return new Anonymous__60cd16e8cd388ee3c469e74b249ed0e3__0();
return new Anonymous__%s__0();
}
class Anonymous__60cd16e8cd388ee3c469e74b249ed0e3__0
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class NoNamespace
{
public function run()
{
return new Anonymous__1d04bdd061e5548df3200e0a8bd62e19__0();
return new Anonymous__%s__0();
}
}
class Anonymous__1d04bdd061e5548df3200e0a8bd62e19__0
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ return new class {

namespace Rector\Tests\DowngradePhp70\Rector\New_\DowngradeAnonymousClassRector\Fixture;

return new Anonymous__4d01ff360d2ab1a3d76c31180eb42d6b__0();
class Anonymous__4d01ff360d2ab1a3d76c31180eb42d6b__0
return new Anonymous__%s__0();
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ return new class {
-----
<?php

return new Anonymous__14972b1cb4f751429a61b4df2d83203d__0();
class Anonymous__14972b1cb4f751429a61b4df2d83203d__0
return new Anonymous__%s__0();
class Anonymous__%s__0
{
public function execute()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class WithArgs
{
public function run($arg1, $arg2)
{
return new Anonymous__1524929001f1c36c7e4ce268f40d4c0a__0($arg1, $arg2);
return new Anonymous__%s__0($arg1, $arg2);
}
}
class Anonymous__1524929001f1c36c7e4ce268f40d4c0a__0
class Anonymous__%s__0
{
public function execute()
{
Expand Down

0 comments on commit e3a7e64

Please sign in to comment.