Code Duplication    Length = 13-14 lines in 2 locations

src/Schema/Schema.php 2 locations

@@ 43-55 (lines=13) @@
40
        return $this->numberType;
41
    }
42
43
    public function getSpaceId($space)
44
    {
45
        if (!array_key_exists($space, $this->spaceId)) {
46
            $response = $this->spaceSpace->select([$space], Index::SPACE_NAME);
47
            $data = $response->getData();
48
            if (!empty($data)) {
49
                $this->spaceId[$space] = $data[0][0];
50
            }
51
        }
52
        if (array_key_exists($space, $this->spaceId)) {
53
            return $this->spaceId[$space];
54
        }
55
    }
56
57
    public function getSpaceName($spaceId)
58
    {
@@ 57-70 (lines=14) @@
54
        }
55
    }
56
57
    public function getSpaceName($spaceId)
58
    {
59
        if (!in_array($spaceId, $this->spaceId)) {
60
            $response = $this->spaceSpace->select([$spaceId], 0);
61
            $data = $response->getData();
62
            if (!empty($data)) {
63
                $this->spaceId[$data[0][2]] = $spaceId;
64
            }
65
        }
66
67
        if (in_array($spaceId, $this->spaceId)) {
68
            return array_search($spaceId, $this->spaceId);
69
        }
70
    }
71
72
    public function hasSpace($space)
73
    {