22
33declare (strict_types=1 );
44
5+ namespace Timeweb \Tests \PHPStan \Reflection ;
6+
57use PHPStan \Reflection \ParametersAcceptorSelector ;
68use PHPStan \Testing \TestCase ;
79use PHPStan \Type \VerbosityLevel ;
810use Timeweb \PHPStan \Reflection \EnumMethodReflection ;
911use Timeweb \PHPStan \Reflection \EnumMethodsClassReflectionExtension ;
12+ use Timeweb \Tests \PHPStan \Fixture \EnumFixture ;
1013
1114/**
12- * @coversDefaultClass Timeweb\PHPStan\Reflection\EnumMethodsClassReflectionExtension
15+ * @coversDefaultClass \ Timeweb\PHPStan\Reflection\EnumMethodsClassReflectionExtension
1316 */
1417class EnumMethodsClassReflectionExtensionTest extends TestCase
1518{
@@ -33,14 +36,17 @@ public function setUp(): void
3336 * @covers ::hasMethod
3437 * @dataProvider methodNameDataProvider
3538 */
36- public function testEnumMethodsCanBeFoundInEnumSubclasses (bool $ expected , string $ methodName )
39+ public function testEnumMethodsCanBeFoundInEnumSubclasses (bool $ expected , string $ methodName ): void
3740 {
3841 $ classReflection = $ this ->broker ->getClass (EnumFixture::class);
3942 $ hasMethod = $ this ->reflectionExtension ->hasMethod ($ classReflection , $ methodName );
4043
4144 $ this ->assertEquals ($ expected , $ hasMethod );
4245 }
4346
47+ /**
48+ * @return array[]
49+ */
4450 public function methodNameDataProvider (): array
4551 {
4652 return [
@@ -52,7 +58,7 @@ public function methodNameDataProvider(): array
5258 /**
5359 * @covers ::hasMethod
5460 */
55- public function testEnumMethodsCannotBeFoundInNonEnumSubclasses ()
61+ public function testEnumMethodsCannotBeFoundInNonEnumSubclasses (): void
5662 {
5763 $ classReflection = $ this ->broker ->getClass (EnumFixture::class);
5864 $ hasMethod = $ this ->reflectionExtension ->hasMethod ($ classReflection , 'SOME_NAME ' );
@@ -62,9 +68,9 @@ public function testEnumMethodsCannotBeFoundInNonEnumSubclasses()
6268
6369 /**
6470 * @covers ::getMethod
65- * @uses Timeweb\PHPStan\Reflection\EnumMethodReflection
71+ * @uses \ Timeweb\PHPStan\Reflection\EnumMethodReflection
6672 */
67- public function testEnumMethodReflectionCanBeObtained ()
73+ public function testEnumMethodReflectionCanBeObtained (): void
6874 {
6975 $ classReflection = $ this ->broker ->getClass (EnumFixture::class);
7076 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , 'SOME_NAME ' );
@@ -80,10 +86,10 @@ public function testEnumMethodReflectionCanBeObtained()
8086 * @covers \Timeweb\PHPStan\Reflection\EnumMethodReflection::isPublic
8187 * @covers \Timeweb\PHPStan\Reflection\EnumMethodReflection::getPrototype
8288 * @covers \Timeweb\PHPStan\Reflection\EnumMethodReflection::getVariants
83- * @uses Timeweb\PHPStan\Reflection\EnumMethodReflection
89+ * @uses \ Timeweb\PHPStan\Reflection\EnumMethodReflection
8490 * @dataProvider enumFixtureProperties
8591 */
86- public function testEnumMethodProperties (string $ propertyName )
92+ public function testEnumMethodProperties (string $ propertyName ): void
8793 {
8894 $ classReflection = $ this ->broker ->getClass (EnumFixture::class);
8995 $ methodReflection = $ this ->reflectionExtension ->getMethod ($ classReflection , $ propertyName );
@@ -97,6 +103,9 @@ public function testEnumMethodProperties(string $propertyName)
97103 $ this ->assertSame (EnumFixture::class, $ parametersAcceptor ->getReturnType ()->describe (VerbosityLevel::value ()));
98104 }
99105
106+ /**
107+ * @return string[][]
108+ */
100109 public function enumFixtureProperties (): array
101110 {
102111 return [
0 commit comments