Code Duplication    Length = 8-8 lines in 2 locations

src/Definition/Dependent/DirectiveLocation.php 1 location

@@ 27-34 (lines=8) @@
24
    /**
25
     * @throws \Railt\Io\Exception\ExternalFileException
26
     */
27
    public function verify(): void
28
    {
29
        $locations = \array_merge(static::EXECUTABLE_LOCATIONS, static::SDL_LOCATIONS);
30
31
        if (! \in_array($this->name, $locations, true)) {
32
            throw $this->error(new TypeConflictException(\sprintf('Invalid name of %s', $this)));
33
        }
34
    }
35
36
    /**
37
     * @return bool

src/Type.php 1 location

@@ 63-70 (lines=8) @@
60
     * @param string $name
61
     * @throws \Railt\Io\Exception\ExternalFileException
62
     */
63
    private function verifyType(string $name): void
64
    {
65
        $types = \array_merge(static::DEPENDENT_TYPES, static::ROOT_TYPES);
66
67
        if (! \in_array($name, $types, true)) {
68
            throw new TypeConflictException(\sprintf('Invalid type name %s', $this));
69
        }
70
    }
71
72
    /**
73
     * @return bool