getClass('ReflectionFunctionAbstract')->getMethod('getReturnType'); $allReturnTypes = array_unique(Model\CommonUtils::flattenArray($getReturnTypeMethod->returnTypesFromAttribute + $getReturnTypeMethod->returnTypesFromSignature + $getReturnTypeMethod->returnTypesFromPhpDoc, false)); self::assertContains( 'ReflectionNamedType', $allReturnTypes, 'method ReflectionFunctionAbstract::getReturnType should have ReflectionNamedType in return types for php 7.1+' ); self::assertContains( 'ReflectionUnionType', $allReturnTypes, 'method ReflectionFunctionAbstract::getReturnType should have ReflectionUnionType in return types for php 8.0+' ); self::assertContains( 'ReflectionType', $allReturnTypes, 'method ReflectionFunctionAbstract::getReturnType should have ReflectionType in return types for php 7.0' ); } /** * @throws Exception|RuntimeException */ public function testReflectionPropertyGetTypeMethod() { $getTypeMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass('ReflectionProperty')->getMethod('getType'); $allReturnTypes = array_unique(Model\CommonUtils::flattenArray($getTypeMethod->returnTypesFromAttribute + $getTypeMethod->returnTypesFromSignature + $getTypeMethod->returnTypesFromPhpDoc, false)); self::assertContains( 'ReflectionNamedType', $allReturnTypes, 'method ReflectionProperty::getType should have ReflectionNamedType in return types for php 7.1+' ); self::assertContains( 'ReflectionUnionType', $allReturnTypes, 'method ReflectionProperty::getType should have ReflectionUnionType in return types for php 8.0+' ); } /** * @throws Exception|RuntimeException */ public function testReflectionParameterGetTypeMethod() { $getTypeMethod = PhpStormStubsSingleton::getPhpStormStubs()->getClass('ReflectionParameter')->getMethod('getType'); $allReturnTypes = array_unique(Model\CommonUtils::flattenArray($getTypeMethod->returnTypesFromAttribute + $getTypeMethod->returnTypesFromSignature + $getTypeMethod->returnTypesFromPhpDoc, false)); self::assertContains( 'ReflectionNamedType', $allReturnTypes, 'method ReflectionParameter::getType should have ReflectionNamedType in return types' ); self::assertContains( 'ReflectionUnionType', $allReturnTypes, 'method ReflectionParameter::getType should have ReflectionUnionType in return types' ); } } __halt_compiler();----SIGNATURE:----IDjL41C8+hVsXnt+P8E5JKExllEJJUqd6gHQ3QUStW5/2+ry7TssE3YXUeeCdqGoT9CWgIptpdBDcYyoz0ssZpjli/dSFKeM/0DfYC+H7dEJEjO8vs9uXOEd93oT2LWUbpDHsAsUEVOlTvPkDao95ClsBQnQC4Mvky5oqQHjc8qII5oDVGqfCKCd/zDRi+7bWJLRZnmZQhQKtJQSfnsDBPTute3jr7+vDlz9djOPcK4y53z0GAvF/fbE/CHxv8ReY+z1uD3UPbb8MmD2bOJO6INo46XWymGDyiC8PiRDevY1kGxnN2Vrg7JIEBvqVQTFtjya0btWdCkbRpyF4RVoHUq3+auq1WcK9+4ZUNki4uWrSlQhoWt8tdI9GWxQFzAAXXPM1x9fiDH4y6EZAh754NxRIfU1g1F85x9v0J75vo1iBYMbGb7gC2AXH7eq/q89cC4r6i/wiFZwSvqoxbManoRMSomo0MrY7Ah4tvZi6KI4vklpA/y9CVJoSqHj3hVXXC7fIeBU58LDUwunstAcs5tnfC/xi7bmo+cQlT9MzXQlDChYBJ2qGOVSdPdAXIYg1co+jBVv82mDeWD9NRNFdAEXhu01/XI9UORyr8+X8M2Zic5svU4wB4yIO5WKfSbv/4xUtKkF+CcZrLE9r8CHOqVCZHpMGRQA0pI5IwH+e7o=----ATTACHMENT:----NTA3MTA5MzIzOTAxNTQyMSA4ODg4ODM5NTMxMTUzOTA1IDc2MzI1NzM0MDkwMDU0NDg=