@param string $fq_classlike_name

@return string|null
341028
public function getReportingLevelForClass($fq_classlike_name)
    {
        foreach ($this->custom_levels as $custom_level) {
            if ($custom_level->allowsClass($fq_classlike_name)) {
                return $custom_level->getErrorLevel();
            }
        }
    }
987487
private final static function loadClass($fqcn)
    {
        $reflectionClass = new ReflectionClass($fqcn);
        $constants       = $reflectionClass->getConstants();

        foreach ($constants as $name => $value) {
            $instance = new $fqcn($fqcn, $name, $value);

            /* @var $instance Enum */
            if (is_callable([$instance, '__initEnum'])) {
                $instance->__initEnum();
            }

            $instanceConstructorName = '__' . $name;
            if (is_callable([$instance, $instanceConstructorName])) {
                $instance->$instanceConstructorName();
            }

            if (!isset(self::$instances[$fqcn])) {
                self::$instances[$fqcn] = [];
            }

            self::$instances[$fqcn][$name] = $instance;
        }
    }
592028
public function getModelNameAsFQCN($referenceNamespace = null)
    {
        $namespace = $this->getEntityNamespace();
        $fqcn = ($namespace == $referenceNamespace) ? false : true;

        return $fqcn ? $namespace.'\\'.$this->getModelName() : $this->getModelName();
    }
222879
public static function className($class)
    {
        $result = App::className($class, 'Model/Behavior', 'Behavior');
        if (!$result) {
            $result = App::className($class, 'ORM/Behavior', 'Behavior');
        }

        return $result ?: null;
    }
822849
public static function checkFullyQualifiedClassLikeName(
        StatementsSource $statements_source,
        $fq_class_name,
        CodeLocation $code_location,
        array $suppressed_issues,
        $inferred = true,
        bool $allow_trait = false,
        bool $allow_interface = true
    ) {
        $codebase = $statements_source->getCodebase();
        if (empty($fq_class_name)) {
            if (IssueBuffer::accepts(
                new UndefinedClass(
                    'Class or interface <empty string> does not exist',
                    $code_location,
                    'empty string'
                ),
                $suppressed_issues
            )) {
                return false;
            }

            return;
        }

        $fq_class_name = preg_replace('/^\\\/', '', $fq_class_name);

        if (in_array($fq_class_name, ['callable', 'iterable', 'self', 'static', 'parent'], true)) {
            return true;
        }

        if (preg_match(
            '/(^|\\\)(int|float|bool|string|void|null|false|true|resource|object|numeric|mixed)$/i',
            $fq_class_name
        )
        ) {
            $class_name_parts = explode('\\', $fq_class_name);
            $class_name = array_pop($class_name_parts);

            if (IssueBuffer::accepts(
                new ReservedWord(
                    $class_name . ' is a reserved word',
                    $code_location,
                    $class_name
                ),
                $suppressed_issues
            )) {
                // fall through
            }

            return null;
        }

        $class_exists = $codebase->classlikes->classExists(
            $fq_class_name,
            !$inferred ? $code_location : null
        );
        $interface_exists = $codebase->classlikes->interfaceExists(
            $fq_class_name,
            !$inferred ? $code_location : null
        );

        if (!$class_exists && !$interface_exists) {
            if (!$allow_trait || !$codebase->classlikes->traitExists($fq_class_name, $code_location)) {
                if (IssueBuffer::accepts(
                    new UndefinedClass(
                        'Class or interface ' . $fq_class_name . ' does not exist',
                        $code_location,
                        $fq_class_name
                    ),
                    $suppressed_issues
                )) {
                    return false;
                }
            }

            return null;
        } elseif ($interface_exists && !$allow_interface) {
            if (IssueBuffer::accepts(
                new UndefinedClass(
                    'Class ' . $fq_class_name . ' does not exist',
                    $code_location,
                    $fq_class_name
                ),
                $suppressed_issues
            )) {
                return false;
            }
        }

        $aliased_name_lc = $codebase->classlikes->getUnAliasedName(
            strtolower($fq_class_name)
        );

        try {
            $class_storage = $codebase->classlike_storage_provider->get($aliased_name_lc);
        } catch (\InvalidArgumentException $e) {
            if (!$inferred) {
                throw $e;
            }

            return null;
        }

        foreach ($class_storage->invalid_dependencies as $dependency_class_name) {
            // if the implemented/extended class is stubbed, it may not yet have
            // been hydrated
            if ($codebase->classlike_storage_provider->has($dependency_class_name)) {
                continue;
            }

            if (IssueBuffer::accepts(
                new MissingDependency(
                    $fq_class_name . ' depends on class or interface '
                        . $dependency_class_name . ' that does not exist',
                    $code_location,
                    $fq_class_name
                ),
                $suppressed_issues
            )) {
                return false;
            }
        }

        if (($class_exists && !$codebase->classHasCorrectCasing($fq_class_name)) ||
            ($interface_exists && !$codebase->interfaceHasCorrectCasing($fq_class_name))
        ) {
            if ($codebase->classlikes->isUserDefined($aliased_name_lc)) {
                if (IssueBuffer::accepts(
                    new InvalidClass(
                        'Class or interface ' . $fq_class_name . ' has wrong casing',
                        $code_location,
                        $fq_class_name
                    ),
                    $suppressed_issues
                )) {
                    // fall through here
                }
            }
        }

        if (!$inferred) {
            $plugin_classes = $codebase->config->after_classlike_exists_checks;

            if ($plugin_classes) {
                $file_manipulations = [];

                foreach ($plugin_classes as $plugin_fq_class_name) {
                    $plugin_fq_class_name::afterClassLikeExistenceCheck(
                        $fq_class_name,
                        $code_location,
                        $statements_source,
                        $codebase,
                        $file_manipulations
                    );
                }

                if ($file_manipulations) {
                    /** @psalm-suppress MixedTypeCoercion */
                    FileManipulationBuffer::add($code_location->file_path, $file_manipulations);
                }
            }
        }

        return true;
    }
723672
private function classExists( $fqcn )
	{
		if ( isset( $this->classExists[$fqcn] ) )
			return $this->classExists[$fqcn];

		// first check if the class already exists, maybe loaded through another AnnotationReader
		if ( class_exists( $fqcn ) )
			return $this->classExists[$fqcn] = true;

		return false;
	}
586002
protected function splitFullQualifyClassName($fqcn)
    {
        $parts = explode('\\', $fqcn);
        $classname = array_pop($parts);
        return [implode('\\', $parts), $classname];
    }
779253
public function getHydratorClassName($fqcn)
    {
        $config = new Configuration($fqcn);
        $config->setAutoGenerateProxies($this->generateProxies);
        $config->setGeneratedClassesTargetDir($this->cacheDir);

        return $config->createFactory()->getHydratorClass();
    }
107916
protected function getTypeWithClassAsContext(string $fqsen, DescriptorAbstract $container): string
    {
        if (!$container instanceof ClassDescriptor
            && !$container instanceof InterfaceDescriptor
            && !$container instanceof TraitDescriptor
        ) {
            return $fqsen;
        }

        $containerFqsen = $container->getFullyQualifiedStructuralElementName();

        return str_replace(self::CONTEXT_MARKER . '::', $containerFqsen . '::', $fqsen);
    }
1361630
public static function afterClassLikeExistenceCheck(
        string $fq_class_name,
        CodeLocation $code_location,
        StatementsSource $statements_source,
        Codebase $codebase,
        array &$file_replacements = []
    ) {
        $candidate_type = $code_location->getSelectedText();
        $aliases = $statements_source->getAliasedClassesFlipped();

        if ($statements_source->getFilePath() !== $code_location->file_path) {
            return;
        }

        if (strpos($candidate_type, '\\' . $fq_class_name) !== false) {
            $type_tokens = Type::tokenize($candidate_type, false);

            foreach ($type_tokens as &$type_token) {
                if ($type_token === ('\\' . $fq_class_name)
                    && isset($aliases[strtolower($fq_class_name)])
                ) {
                    $type_token = $aliases[strtolower($fq_class_name)];
                }
            }

            $new_candidate_type = implode('', $type_tokens);

            if ($new_candidate_type !== $candidate_type) {
                $bounds = $code_location->getSelectionBounds();
                $file_replacements[] = new FileManipulation($bounds[0], $bounds[1], $new_candidate_type);
            }
        }
    }
574736
protected static function _GetSeesionClassLayerPath ($name = [], $class_path = null) {
		$classes_layer_path = [
			'fw2',
			'classes',
			$class_path ?: static::class
		];
		return array_merge($classes_layer_path, Arrays::AdjustArray($name));
	}
196888
private final static function &getInstances($fqcn)
    {
        if (!isset(self::$instances[$fqcn])) {
            self::loadClass($fqcn);
        }

        return self::$instances[$fqcn];
    }
138837
public static function getParameters(string $classFqcn, string $method): array
    {
        try {
            $reflectionMethod = new ReflectionMethod($classFqcn, $method);
        } catch (ReflectionException $e) {
            return [];
        }

        foreach ($reflectionMethod->getParameters() as $index => $param) {
            $reflectionParameters[$index]['name'] = $param->getName();
            if (null !== $param->getClass()) {
                $reflectionParameters[$index]['class'] = $param->getClass()->name;
            }
        }

        return $reflectionParameters ?? [];
    }
765359
protected function getClassLikeObject(string $name, $statements)
    {
        foreach ($statements as $statement) {
            if (is_a($statement, Namespace_::class)) {
                $this->nameSpace = $statement->name;
            }

            if (is_a($statement, StmtClassLike::class) && $statement->name == $name) {
                return $statement;
            }
            if (property_exists($statement, 'stmts')) {
                $return = $this->getClassLikeObject($name, $statement->stmts);
                if (!empty($return)) {
                    return $return;
                }
            }
        }

        return null;
    }
976122
private function isInstanceOf($value, $classFQN)
    {
        return is_object($value)
        && (strtolower(get_class($value)) === strtolower($classFQN) || \is_subclass_of($value, $classFQN, true));
    }
497101
protected function getFQCNComp($name)
    {
        if (method_exists($this, 'qualifyClass')) {
            return $this->qualifyClass($name);
        } elseif (method_exists($this, 'parseName')) {
            return $this->parseName($name);
        } else {
            throw new UnknownLaravelVersionException(
                sprintf(
                    "There's an incompatible parent class `%s` in your installed version of Laravel",
                    get_parent_class($this)
                )
            );
        }
    }
1310822
public function toNamespacedString($namespace, array $aliased_classes, $this_class, $use_phpdoc_format)
    {
        if ($this->fq_classlike_name === 'static') {
            return 'static::' . $this->const_name;
        }

        if ($this->fq_classlike_name === $this_class) {
            return 'self::' . $this->const_name;
        }

        if ($namespace && stripos($this->fq_classlike_name, $namespace . '\\') === 0) {
            return preg_replace(
                '/^' . preg_quote($namespace . '\\') . '/i',
                '',
                $this->fq_classlike_name
            ) . '::' . $this->const_name;
        }

        if (!$namespace && stripos($this->fq_classlike_name, '\\') === false) {
            return $this->fq_classlike_name . '::' . $this->const_name;
        }

        if (isset($aliased_classes[strtolower($this->fq_classlike_name)])) {
            return $aliased_classes[strtolower($this->fq_classlike_name)] . '::' . $this->const_name;
        }

        return '\\' . $this->fq_classlike_name . '::' . $this->const_name;
    }