protected function setAnnotation(array $matches, int $index, array &$annotations): void
    {
        $properties = $this->getAnnotationProperties($matches, $index);

        // Get the annotation model from the annotations map
        $annotation = $this->getAnnotationFromMap($properties['annotation']);

        // Set the annotation's type
        $annotation->setAnnotationType($properties['annotation']);

        // If there are arguments
        if (null !== $properties['arguments'] && $properties['arguments']) {
            // Filter the arguments and set them in the annotation
            $annotation->setAnnotationArguments(
                $this->getArguments($properties['arguments'])
            );

            // Having set the arguments there's no need to retain this key in
            // the properties
            unset($properties['arguments']);

            // Set the annotation's arguments to setters if they exist
            $this->setAnnotationArguments($annotation);

            // If all arguments have been set to their own properties in the
            // annotation model
            if (empty($annotation->getAnnotationArguments())) {
                // Set the arguments to null
                $annotation->setAnnotationArguments();
            }
        }

        // Set all the matches
        $annotation->setMatches($properties);

        // Set the annotation in the list
        $annotations[] = $annotation;
    }