Code Duplication    Length = 6-6 lines in 2 locations

src/Annotation/Slumber/Store/CompoundIndex.php 1 location

@@ 38-43 (lines=6) @@
35
    {
36
        $direction = $this->getDirection();
37
38
        if ($direction !== self::ASCENDING && $direction !== self::DESCENDING) {
39
            throw $this->createValidationException(
40
                $context,
41
                'The index direction must be "ASC" or "DESC" but "' . $direction . '" was found.'
42
            );
43
        }
44
45
        if (! \is_array($this->def)) {
46
            throw $this->createValidationException(

src/Annotation/Slumber/Store/Indexed.php 1 location

@@ 27-32 (lines=6) @@
24
    {
25
        $direction = $this->getDirection();
26
27
        if ($direction !== self::ASCENDING && $direction !== self::DESCENDING) {
28
            throw $this->createValidationException(
29
                $context,
30
                'The index direction must be "ASC" or "DESC" but "' . $direction . '" was found.'
31
            );
32
        }
33
    }
34
}
35