protected function processClassMethod(ClassMethod $method, string $fullClassName, array $uses = []): void
    {
        $fullMethodName = $fullClassName . '::' . $method->name;
        $type = $method->returnType;

        if ($type instanceof NullableType) {
            $type = ['null', $this->mapClassAndNamespace($uses, (string)$type->type)];
            sort($type);
        } else {
            if (!is_null($type)) {
                $type = (string)$type;
            }
        }

        $type = $this->mapClassAndNamespace($uses, $type);

        $thisMethod = [
            'file' => $this->file,
            'class' => $fullClassName,
            'name' => $fullMethodName,
            'line' => $method->getAttribute('startLine'),
            'return' => $type,
            'params' => [],
            'docblock' => $this->getDocBlock($method, $uses),
        ];

        /** @var Param $param */
        foreach ($method->params as $param) {
            $type = $this->getClassMethodReturnType($param, $uses);

            if (!isset($param->var)) {
                throw new RuntimeException('Access to an undefined property PhpParser\Node\Param::$var');
            }

            if (!isset($param->var->name)) {
                throw new RuntimeException('Access to an undefined property PhpParser\Node\Param::$var->$name');
            }

            if (!is_string($param->var->name)) {
                throw new RuntimeException('Access to invalid property PhpParser\Node\Param::$var->$name');
            }

            $thisMethod['params']['$' . $param->var->name] = $type;
        }

        $this->methods[$fullMethodName] = $thisMethod;
    }
protected function processClassMethod(ClassMethod $method, string $fullClassName, array $uses = []): void
    {
        $fullMethodName = $fullClassName . '::' . $method->name;
        $type = $method->returnType;

        if ($type instanceof NullableType) {
            $type = ['null', $this->mapClassAndNamespace($uses, (string)$type->type)];
            sort($type);
        } else {
            if (!is_null($type)) {
                $type = (string)$type;
            }
        }

        $type = $this->mapClassAndNamespace($uses, $type);

        $thisMethod = [
            'file' => $this->file,
            'class' => $fullClassName,
            'name' => $fullMethodName,
            'line' => $method->getAttribute('startLine'),
            'return' => $type,
            'params' => [],
            'docblock' => $this->getDocBlock($method, $uses),
        ];

        /** @var Param $param */
        foreach ($method->params as $param) {
            $type = $this->getClassMethodReturnType($param, $uses);

            if (!isset($param->var)) {
                throw new RuntimeException('Access to an undefined property PhpParser\Node\Param::$var');
            }

            if (!isset($param->var->name)) {
                throw new RuntimeException('Access to an undefined property PhpParser\Node\Param::$var->$name');
            }

            if (!is_string($param->var->name)) {
                throw new RuntimeException('Access to invalid property PhpParser\Node\Param::$var->$name');
            }

            $thisMethod['params']['$' . $param->var->name] = $type;
        }

        $this->methods[$fullMethodName] = $thisMethod;
    }
protected function processClassMethod ( ClassMethod $ method , string $ fullClassName , array $ uses = [ ] ) : void { $ fullMethodName = $ fullClassName . '::' . $ method -> name ; $ type = $ method -> returnType ; if ( $ type instanceof NullableType ) { $ type = [ 'null' , $ this -> mapClassAndNamespace ( $ uses , ( string ) $ type -> type ) ] ; sort ( $ type ) ; } else { if ( ! is_null ( $ type ) ) { $ type = ( string ) $ type ; } } $ type = $ this -> mapClassAndNamespace ( $ uses , $ type ) ; $ thisMethod = [ 'file' => $ this -> file , 'class' => $ fullClassName , 'name' => $ fullMethodName , 'line' => $ method -> getAttribute ( 'startLine' ) , 'return' => $ type , 'params' => [ ] , 'docblock' => $ this -> getDocBlock ( $ method , $ uses ) , ] ; /** @var Param $param */ foreach ( $ method -> params as $ param ) { $ type = $ this -> getClassMethodReturnType ( $ param , $ uses ) ; if ( ! isset ( $ param -> var ) ) { throw new RuntimeException ( 'Access to an undefined property PhpParser\Node\Param::$var' ) ; } if ( ! isset ( $ param -> var -> name ) ) { throw new RuntimeException ( 'Access to an undefined property PhpParser\Node\Param::$var->$name' ) ; } if ( ! is_string ( $ param -> var -> name ) ) { throw new RuntimeException ( 'Access to invalid property PhpParser\Node\Param::$var->$name' ) ; } $ thisMethod [ 'params' ] [ '$' . $ param -> var -> name ] = $ type ; } $ this -> methods [ $ fullMethodName ] = $ thisMethod ; }
Process class method.

@param ClassMethod $method
@param string $fullClassName
@param array $uses

@return void
Process class method .