Skip to content

Commit 0aca521

Browse files
committed
Fixes a few phpstan errors up to level 6
1 parent 6c5ded9 commit 0aca521

File tree

7 files changed

+7
-17
lines changed

7 files changed

+7
-17
lines changed

src/bitExpert/PHPStan/Magento/Reflection/MagicMethodReflection.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ public function getPrototype(): ClassMemberReflection
7676
return $this;
7777
}
7878

79-
/**
80-
* @return ParametersAcceptor[]
81-
*/
8279
public function getVariants(): array
8380
{
8481
return $this->variants;

src/bitExpert/PHPStan/Magento/Type/ObjectManagerDynamicReturnTypeExtension.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
class ObjectManagerDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
2626
{
27-
/**
28-
* @return string
29-
*/
3027
public function getClass(): string
3128
{
3229
return 'Magento\Framework\App\ObjectManager';

src/bitExpert/PHPStan/Magento/Type/TestFrameworkObjectManagerDynamicReturnTypeExtension.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828

2929
class TestFrameworkObjectManagerDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
3030
{
31-
/**
32-
* @return string
33-
*/
3431
public function getClass(): string
3532
{
3633
return 'Magento\Framework\TestFramework\Unit\Helper\ObjectManager';

tests/bitExpert/PHPStan/Magento/Autoload/RegistrationUnitTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,19 @@ class RegistrationUnitTest extends TestCase
2121
{
2222
/**
2323
* @test
24-
* @dataProvider provideAutoloaders()
24+
* @dataProvider provideAutoloaders
2525
*/
2626
public function autoloadersCanRegisterAndUnregister(Autoloader $autoloader): void
2727
{
28-
/** @var array<callable> $initialAutoloadFunctions */
2928
$initialAutoloadFunctions = spl_autoload_functions();
3029

3130
$autoloader->register();
32-
/** @var array<callable> $registerAutoloadFunctions */
31+
3332
$registerAutoloadFunctions = spl_autoload_functions();
3433
static::assertCount(count($initialAutoloadFunctions) + 1, $registerAutoloadFunctions);
3534

3635
$autoloader->unregister();
37-
/** @var array<callable> $unregisterAutoloadFunctions */
36+
3837
$unregisterAutoloadFunctions = spl_autoload_functions();
3938
static::assertCount(count($initialAutoloadFunctions), $unregisterAutoloadFunctions);
4039
}

tests/bitExpert/PHPStan/Magento/Reflection/Framework/DataObjectMagicMethodReflectionExtensionUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class DataObjectMagicMethodReflectionExtensionUnitTest extends TestCase
3535

3636
protected function setUp(): void
3737
{
38-
$this->markTestSkipped('TODO: solve issue with final class ClassReflection');
38+
self::markTestSkipped('TODO: solve issue with final class ClassReflection');
3939

4040
$this->extension = new DataObjectMagicMethodReflectionExtension();
4141
$this->classReflection = $this->createMock(ClassReflection::class);

tests/bitExpert/PHPStan/Magento/Reflection/Framework/Session/SessionManagerMagicMethodReflectionExtensionUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SessionManagerMagicMethodReflectionExtensionUnitTest extends TestCase
3333

3434
protected function setUp(): void
3535
{
36-
$this->markTestSkipped('TODO: solve issue with final class ClassReflection');
36+
self::markTestSkipped('TODO: solve issue with final class ClassReflection');
3737

3838
$this->extension = new SessionManagerMagicMethodReflectionExtension();
3939
$this->classReflection = $this->createMock(ClassReflection::class);

tests/bitExpert/PHPStan/Magento/Reflection/MagicMethodReflectionUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MagicMethodReflectionUnitTest extends TestCase
2222
*/
2323
public function magicMethodReflectionCreation(): void
2424
{
25-
$this->markTestSkipped('TODO: solve issue with final class ClassReflection');
25+
self::markTestSkipped('TODO: solve issue with final class ClassReflection');
2626

2727
$classReflection = $this->createMock(ClassReflection::class);
2828
$methodName = 'myTestMethod';
@@ -55,7 +55,7 @@ public function magicMethodReflectionCreationSideeffects(
5555
string $methodName,
5656
\PHPStan\TrinaryLogic $expectedResult
5757
): void {
58-
$this->markTestSkipped('TODO: solve issue with final class ClassReflection');
58+
self::markTestSkipped('TODO: solve issue with final class ClassReflection');
5959

6060
$classReflection = $this->createMock(ClassReflection::class);
6161
$variants = [];

0 commit comments

Comments
 (0)