Code Duplication    Length = 8-8 lines in 2 locations

src/Validation/Execution/JsonApiErrorCollection.php 1 location

@@ 103-110 (lines=8) @@
100
     *
101
     * @return string
102
     */
103
    private function getValidationMessage(ErrorInterface $error): string
104
    {
105
        $context = $error->getMessageContext();
106
        $args    = $context === null ? [] : $context;
107
        $message = $this->getMessageFormatter()->formatMessage($error->getMessageCode(), $args);
108
109
        return $message;
110
    }
111
112
    /**
113
     * @return FormatterInterface

src/Validation/Validator.php 1 location

@@ 557-564 (lines=8) @@
554
     *
555
     * @return string
556
     */
557
    private function getMessage(ErrorInterface $error): string
558
    {
559
        $context = $error->getMessageContext();
560
        $args    = $context === null ? [] : $context;
561
        $message = $this->formatMessage($error->getMessageCode(), $args);
562
563
        return $message;
564
    }
565
566
    /**
567
     * @return array