Skip to content

Commit 7832a44

Browse files
committed
cleanup
1 parent cf6a177 commit 7832a44

10 files changed

+15
-126
lines changed

.phpunit.cache/test-results

Lines changed: 0 additions & 1 deletion
This file was deleted.

composer.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,11 @@
3535
]
3636
}
3737
},
38-
<<<<<<< HEAD
39-
<<<<<<< HEAD
40-
=======
41-
=======
42-
>>>>>>> f95775c (fixup! misc)
4338
"scripts": {
4439
"fix-cs": "vendor/bin/ecs check src tests --fix",
4540
"check-cs": "vendor/bin/ecs check src tests",
4641
"phpstan": "vendor/bin/phpstan"
4742
},
48-
<<<<<<< HEAD
49-
>>>>>>> dd66021 (fixup! misc)
50-
=======
51-
>>>>>>> f95775c (fixup! misc)
5243
"config": {
5344
"allow-plugins": {
5445
"phpstan/extension-installer": true,

config/extension.neon

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ parameters:
1616
- ../stubs/Utility.stub
1717

1818
services:
19-
# checked
2019
-
2120
class: PHPStanCakePHP2\ClassPropertyExtension\ClassComponentPropertyExtension
2221
tags:
@@ -27,20 +26,18 @@ services:
2726
tags:
2827
- phpstan.broker.propertiesClassReflectionExtension
2928

30-
# checked
3129
-
3230
class: PHPStanCakePHP2\ReturnTypeExtension\ClassRegistryInitExtension
3331
tags:
3432
- phpstan.broker.dynamicStaticMethodReturnTypeExtension
3533

36-
# checked
3734
-
3835
class: PHPStanCakePHP2\ClassPropertyExtension\ShellClassPropertyExtension
3936
tags:
4037
- phpstan.broker.propertiesClassReflectionExtension
4138

4239
-
43-
class: PHPStanCakePHP2\ModelBehaviorsExtension
40+
class: PHPStanCakePHP2\ClassMethodExtension\ModelMethodExtension
4441
arguments:
4542
behaviorPaths: %behaviorPaths%
4643
tags:
@@ -50,9 +47,3 @@ services:
5047
class: PHPStanCakePHP2\Service\SchemaService
5148
arguments:
5249
schemaPaths: %schemaPaths%
53-
54-
-
55-
class: PHPStanCakePHP2\LoadComponentOnFlyMethodReturnTypeExtension
56-
tags:
57-
- phpstan.broker.dynamicMethodReturnTypeExtension
58-

src/ModelBehaviorsExtension.php renamed to src/ClassMethodExtension/ModelMethodExtension.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22

33
declare(strict_types=1);
44

5-
namespace PHPStanCakePHP2;
5+
namespace PHPStanCakePHP2\ClassMethodExtension;
66

77
use Exception;
88
use PHPStan\Reflection\ClassReflection;
99
use PHPStan\Reflection\MethodReflection;
1010
use PHPStan\Reflection\MethodsClassReflectionExtension;
1111
use PHPStan\Reflection\ReflectionProvider;
12+
use PHPStanCakePHP2\ModelBehaviorMethodExtractor;
1213
use PHPStanCakePHP2\Reflection\ClassReflectionFinder;
1314

1415
/**
1516
* Adds methods to {@link Model}s from {@link ModelBehavior} classes.
1617
*/
17-
final class ModelBehaviorsExtension implements MethodsClassReflectionExtension
18+
final class ModelMethodExtension implements MethodsClassReflectionExtension
1819
{
1920
private ReflectionProvider $reflectionProvider;
2021

src/LoadComponentOnFlyMethodReturnTypeExtension.php

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/ModelBehaviorMethodExtractor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use PHPStan\Reflection\ParameterReflection;
1212
use PHPStan\Reflection\ParametersAcceptor;
1313
use PHPStan\Type\ObjectType;
14+
use PHPStanCakePHP2\Reflection\ModelBehaviorMethodWrapper;
1415

1516
final class ModelBehaviorMethodExtractor
1617
{

src/ModelBehaviorMethodWrapper.php renamed to src/Reflection/ModelBehaviorMethodWrapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace PHPStanCakePHP2;
5+
namespace PHPStanCakePHP2\Reflection;
66

77
use PHPStan\Reflection\ClassMemberReflection;
88
use PHPStan\Reflection\ClassReflection;

tests/Feature/ControllerExtensionsTest.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
44

55
namespace PHPStanCakePHP2\Tests\Feature;
66

7+
use Iterator;
78
use PHPStan\Testing\TypeInferenceTestCase;
89
use PHPUnit\Framework\Attributes\DataProvider;
910

10-
class ControllerExtensionsTest extends TypeInferenceTestCase
11+
final class ControllerExtensionsTest extends TypeInferenceTestCase
1112
{
12-
/**
13-
* @return mixed[]
14-
*/
15-
public static function dataFileAsserts(): \Iterator
13+
#[DataProvider('dataFileAsserts')]
14+
public function test(string $assertType, string $file, ...$args): void
15+
{
16+
$this->assertFileAsserts($assertType, $file, ...$args);
17+
}
18+
19+
public static function dataFileAsserts(): Iterator
1620
{
1721
yield from self::gatherAssertTypes(__DIR__ . '/data/existing_controller_model.php');
1822
yield from self::gatherAssertTypes(__DIR__ . '/data/existing_controller_component.php');
@@ -21,12 +25,6 @@ public static function dataFileAsserts(): \Iterator
2125
yield from self::gatherAssertTypes(__DIR__ . '/data/existing_controller_component_from_parent_controller.php');
2226
}
2327

24-
#[DataProvider('dataFileAsserts')]
25-
public function test(string $assertType, string $file, ...$args): void
26-
{
27-
$this->assertFileAsserts($assertType, $file, ...$args);
28-
}
29-
3028
public static function getAdditionalConfigFiles(): array
3129
{
3230
return [

tests/Feature/LoadComponentOnFlyMethodReturnTypeExtensionTest.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/Feature/data/loading_component_loaded_on_fly.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)