src/DependencyInjection/Compiler/RpcMethodPass.php
public function loadClassMetadata(\ReflectionClass $reflectionClass): ?array
    {
        $method = $this->reader->getClassAnnotation($reflectionClass, Mapping\Method::class);

        if (null === $method) {
            return null;
        }

        $meta = [];

        if (empty($method->value)) {
            throw new InvalidMappingException(
                \sprintf(
                    '@Method annotation must have name in class "%s", @Method("method name")',
                    $reflectionClass->getName()
                )
            );
        }

        $meta['method'] = $method->value;
        $meta['class'] = $reflectionClass->getName();
        $meta['file'] = $reflectionClass->getFileName();

        // Cache
        $meta['cache'] = null;
        $cache = $this->reader->getClassAnnotation($reflectionClass, Mapping\Cache::class);
        /** @var Mapping\Cache $cache */
        if (null !== $cache) {
            $meta['cache'] = (int) $cache->lifetime;
        }

        // Roles
        $meta['roles'] = null;
        $roles = $this->reader->getClassAnnotation($reflectionClass, Mapping\Roles::class);
        /** @var Mapping\Roles $roles */
        if (null !== $roles) {
            $meta['roles'] = (array) $roles->value;
        }

        // Method execute. On in class
        $meta['executeMethod'] = null;

        foreach ($reflectionClass->getMethods() as $reflectionMethod) {
            if ($paramMeta = $this->reader->getMethodAnnotation($reflectionMethod, Mapping\Execute::class)) {
                $meta['executeMethod'] = $reflectionMethod->name;
            }
        }

        if (empty($meta['executeMethod'])) {
            throw new InvalidMappingException(
                \sprintf(
                    'Method need have @Execute annotation in class "%s", @Execute()',
                    $reflectionClass->getName()
                )
            );
        }

        // Params
        $meta['params'] = [];

        foreach ($reflectionClass->getProperties() as $reflectionProperty) {
            if ($paramMeta = $this->reader->getPropertyAnnotation($reflectionProperty, Mapping\Param::class)) {
                $meta['params'][$reflectionProperty->name] = true;
            }
        }

        return $meta;
    }
public function loadClassMetadata(\ReflectionClass $reflectionClass): ?array
    {
        $method = $this->reader->getClassAnnotation($reflectionClass, Mapping\Method::class);

        if (null === $method) {
            return null;
        }

        $meta = [];

        if (empty($method->value)) {
            throw new InvalidMappingException(
                \sprintf(
                    '@Method annotation must have name in class "%s", @Method("method name")',
                    $reflectionClass->getName()
                )
            );
        }

        $meta['method'] = $method->value;
        $meta['class'] = $reflectionClass->getName();
        $meta['file'] = $reflectionClass->getFileName();

        // Cache
        $meta['cache'] = null;
        $cache = $this->reader->getClassAnnotation($reflectionClass, Mapping\Cache::class);
        /** @var Mapping\Cache $cache */
        if (null !== $cache) {
            $meta['cache'] = (int) $cache->lifetime;
        }

        // Roles
        $meta['roles'] = null;
        $roles = $this->reader->getClassAnnotation($reflectionClass, Mapping\Roles::class);
        /** @var Mapping\Roles $roles */
        if (null !== $roles) {
            $meta['roles'] = (array) $roles->value;
        }

        // Method execute. On in class
        $meta['executeMethod'] = null;

        foreach ($reflectionClass->getMethods() as $reflectionMethod) {
            if ($paramMeta = $this->reader->getMethodAnnotation($reflectionMethod, Mapping\Execute::class)) {
                $meta['executeMethod'] = $reflectionMethod->name;
            }
        }

        if (empty($meta['executeMethod'])) {
            throw new InvalidMappingException(
                \sprintf(
                    'Method need have @Execute annotation in class "%s", @Execute()',
                    $reflectionClass->getName()
                )
            );
        }

        // Params
        $meta['params'] = [];

        foreach ($reflectionClass->getProperties() as $reflectionProperty) {
            if ($paramMeta = $this->reader->getPropertyAnnotation($reflectionProperty, Mapping\Param::class)) {
                $meta['params'][$reflectionProperty->name] = true;
            }
        }

        return $meta;
    }
@param \ReflectionClass $reflectionClass

@throws InvalidMappingException

@return null|array