protected function extractParamAnnotations(string $docComment): array
    {
        $pattern = '/@param(?:\s+([^$"]\S+))?(?:\s+\$(\w+))?(?:\s+"([^"]++)")?/';

        if (!(bool)preg_match_all($pattern, $docComment, $matches, PREG_SET_ORDER)) {
            return [];
        }

        $annotations = [];

        foreach ($matches as $index => $match) {
            $annotations[$index] = isset($match[3]) && $match[3] !== '' ? $match[3] : null;
        }

        return $annotations;
    }
protected function extractParamAnnotations(string $docComment): array
    {
        $pattern = '/@param(?:\s+([^$"]\S+))?(?:\s+\$(\w+))?(?:\s+"([^"]++)")?/';

        if (!(bool)preg_match_all($pattern, $docComment, $matches, PREG_SET_ORDER)) {
            return [];
        }

        $annotations = [];

        foreach ($matches as $index => $match) {
            $annotations[$index] = isset($match[3]) && $match[3] !== '' ? $match[3] : null;
        }

        return $annotations;
    }
protected function extractParamAnnotations ( string $ docComment ) : array { $ pattern = '/@param(?:\s+([^$"]\S+))?(?:\s+\$(\w+))?(?:\s+"([^"]++)")?/' ; if ( ! ( bool ) preg_match_all ( $ pattern , $ docComment , $ matches , PREG_SET_ORDER ) ) { return [ ] ; } $ annotations = [ ] ; foreach ( $ matches as $ index => $ match ) { $ annotations [ $ index ] = isset ( $ match [ 3 ] ) && $ match [ 3 ] !== '' ? $ match [ 3 ] : null ; } return $ annotations ; }
Get annotations for the constructor parameters.
Annotated parameter types are not considered. Turning the class to a FQCN is more work than it's worth.

@param string $docComment
@return array
Get annotations for the constructor parameters . Annotated parameter types are not considered . Turning the class to a FQCN is more work than it s worth .