hasFullyQualifiedInterfaceName($fq_interface_name); } /** * @param string $fq_interface_name * @param FileChecker $file_checker * * @return bool */ public static function hasCorrectCasing(ProjectChecker $project_checker, $fq_interface_name) { return isset($project_checker->existing_interfaces[$fq_interface_name]); } /** * @param string $interface_name * @param string $possible_parent * @param FileChecker $file_checker * * @return bool */ public static function interfaceExtends(ProjectChecker $project_checker, $interface_name, $possible_parent) { return in_array($possible_parent, self::getParentInterfaces($project_checker, $interface_name), true); } /** * @param string $fq_interface_name * @param FileChecker $file_checker * * @return array all interfaces extended by $interface_name */ public static function getParentInterfaces(ProjectChecker $project_checker, $fq_interface_name) { $fq_interface_name = strtolower($fq_interface_name); $extended_interfaces = []; $storage = $project_checker->classlike_storage_provider->get($fq_interface_name); return $storage->parent_interfaces; } }