Code Duplication    Length = 10-10 lines in 2 locations

src/Database/Schema.php 2 locations

@@ 21-30 (lines=10) @@
18
     *
19
     * @return self
20
     */
21
    public function createDatabase(Database $database): self
22
    {
23
        if ($this->hasDatabase($database::getName())) {
24
            throw new InvalidArgumentException('Database '.$database::getName().' already added');
25
        }
26
27
        $this->databases[$database::getName()] = $database;
28
29
        return $this;
30
    }
31
32
    /**
33
     * @param Database $database
@@ 53-62 (lines=10) @@
50
     *
51
     * @return Schema
52
     */
53
    public function removeDatabase(Database $database): self
54
    {
55
        if (!$this->hasDatabase($database::getName())) {
56
            throw new InvalidArgumentException('Database '.$database::getName().' not exists');
57
        }
58
59
        unset($this->databases[$database::getName()]);
60
61
        return $this;
62
    }
63
64
    /**
65
     * @param string $name