$entity) { foreach ($problemTypes as $problemType) { if ($entity->hasMutedProblem($problemType)) { $hasProblem = true; } } if ($entity->hasMutedProblem(StubProblemType::STUB_IS_MISSED) || $additionalFilter !== null && $additionalFilter($entity) === true) { $hasProblem = true; } if ($hasProblem) { $hasProblem = false; } else { $resultArray[$key] = $entity; } } return $resultArray; } /** * @return PHPFunction[] * @throws RuntimeException */ public static function getFilteredFunctions( PHPInterface|PHPClass $class = null, bool $shouldSuitCurrentPhpVersion = true, ): array { if ($class === null) { $allFunctions = ReflectionStubsSingleton::getReflectionStubs()->getFunctions(); } else { $allFunctions = $class->methods; } /** @var PHPFunction[] $resultArray */ $resultArray = []; $allFunctions = array_filter( $allFunctions, fn ($function) => !$shouldSuitCurrentPhpVersion || BasePHPElement::entitySuitsCurrentPhpVersion($function) ); foreach (self::getFiltered($allFunctions, null, StubProblemType::HAS_DUPLICATION, StubProblemType::FUNCTION_PARAMETER_MISMATCH) as $function) { $resultArray[] = $function; } return $resultArray; } public static function getFilteredParameters( PHPFunction $function, callable $additionalFilter = null, int ...$problemType, ): array { /** @var PHPParameter[] $resultArray */ $resultArray = []; foreach (self::getFiltered( $function->parameters, $additionalFilter, StubProblemType::FUNCTION_PARAMETER_MISMATCH, ...$problemType ) as $parameter) { $resultArray[] = $parameter; } return $resultArray; } public static function getFilterFunctionForAllowedTypeHintsInLanguageLevel(float $languageVersion): callable { return function (PHPClass|PHPInterface $stubClass, PHPMethod $stubMethod, ?float $firstSinceVersion) use ($languageVersion) { $reflectionClass = ReflectionStubsSingleton::getReflectionStubs()->getClass($stubClass->name); $reflectionMethod = null; if ($reflectionClass !== null) { $reflectionMethods = array_filter( $reflectionClass->methods, fn (PHPMethod $method) => $stubMethod->name === $method->name ); $reflectionMethod = array_pop($reflectionMethods); } return $reflectionMethod !== null && ($stubMethod->isFinal || $stubClass->isFinal || $firstSinceVersion !== null && $firstSinceVersion > $languageVersion); }; } } __halt_compiler();----SIGNATURE:----LeI+8d8YDnRSbCBRqybBl9rqXToQkyOJwGcsCjuSEXhQ0U5SMJUIozyQ/0OJZCQA0hjayPZ7gRUZ1cHnbumLyCgv1nFkZRxi2sQdbcgtM51cDkzon6NA2JGarWRHU8huWwNc+3DTtC/2ol6DcqvkgpV5VcRhMpdLDfJ/F4ty1ccRaiemJTc/vGX/VMRq2KHqEW5DY5d29km0N4Uylm+zGO4ZJ2ZyqXeRwGfFkGbTs/fdRy8WGf7LJfTosMGwCs+hWJIJJU1ETGDt88rFKDUyzOZYkJbJcjuxvAkoZqZtRWLs3iSnwVOCo1zmwZAeenNhf9gF9Apckn7N8g28OnvYAKVtHTcDr83AAjHp+vfAgkFGIBdrjRvZJOFRdJGbqI8AWfz9CK+6ywfN9r7Sn+beuVgFMIbyGdChL+nh4maxHPb+I6SF5jI11ZDgKBeGyk0N7129Bx9r13jW+Hs8o2WMmac3o4yYQv6cx1jJ47VpLJmd5QOfQ8H+luGe7tL85pVF07QEiFYyK2IQyCT75ohflKIPGYzf9HT11pkMAp6wcDrekkY7h/07KR+22WZpOjLiEMtNFTYWmeVo1Lu+GMPbbS6vNnFnCpRBaM7bm+YPvI24sD9/9X0y3x+qyL8ybuPq0F1E6MwaZMhX7NrtJrDBmZSSnZxYW3Kn8Dhj1GSYelc=----ATTACHMENT:----ODI5MzY0NTQwOTgwNTY5IDgwNTAwMTAzODIyMjYxMjggOTEwNTAwMzc5OTg2OTc1Nw==