private function parseAnnotations($annotations)
    {
        // parse array from (numeric key => 'annotation <value>') to (annotation => value)
        $methodServices = [];
        foreach ($annotations as $annotation) {
            if (!preg_match('/^(\w+)\s+\$(\w+)\s+([\w\.\@\%]+)/', $annotation, $matches)) {
                continue;
            }

            array_shift($matches);
            $tag = array_shift($matches);
            if ($tag == self::SERVICE_DOC_TAG) {
                list($argument, $service) = $matches;
                $methodServices[$argument] = $service;
            }
        }

        return $methodServices;
    }
private function parseAnnotations($annotations)
    {
        // parse array from (numeric key => 'annotation <value>') to (annotation => value)
        $methodServices = [];
        foreach ($annotations as $annotation) {
            if (!preg_match('/^(\w+)\s+\$(\w+)\s+([\w\.\@\%]+)/', $annotation, $matches)) {
                continue;
            }

            array_shift($matches);
            $tag = array_shift($matches);
            if ($tag == self::SERVICE_DOC_TAG) {
                list($argument, $service) = $matches;
                $methodServices[$argument] = $service;
            }
        }

        return $methodServices;
    }
private function parseAnnotations ( $ annotations ) { // parse array from (numeric key => 'annotation <value>') to (annotation => value) $ methodServices = [ ] ; foreach ( $ annotations as $ annotation ) { if ( ! preg_match ( '/^(\w+)\s+\$(\w+)\s+([\w\.\@\%]+)/' , $ annotation , $ matches ) ) { continue ; } array_shift ( $ matches ) ; $ tag = array_shift ( $ matches ) ; if ( $ tag == self :: SERVICE_DOC_TAG ) { list ( $ argument , $ service ) = $ matches ; $ methodServices [ $ argument ] = $ service ; } } return $ methodServices ; }
Returns an array with the method arguments service requirements,
if the methods use the service Annotation.

@return array array of methods and their service dependencies
Returns an array with the method arguments service requirements if the methods use the service Annotation .