Code Duplication    Length = 3-5 lines in 3 locations

src/Config.php 3 locations

@@ 37-39 (lines=3) @@
34
     */
35
    public function getFiled($entityName, $attribute)
36
    {
37
        if (!isset($this->entityMap[$entityName]['columnsAsAttributesMap'])) {
38
            throw new ConfigException(sprintf("entity_map[columnsAsAttributesMap] not configured for %s", $entityName));
39
        }
40
41
        $field = array_search($attribute, $this->entityMap[$entityName]['columnsAsAttributesMap']);
42
@@ 142-146 (lines=5) @@
139
     */
140
    public function getColumnsAsAttributesMap($entityName)
141
    {
142
        if (!isset($this->entityMap[$entityName]['columnsAsAttributesMap'])) {
143
            throw new ConfigException(
144
                sprintf("entity_map[columnsAsAttributesMap] not configured for %s", $entityName)
145
            );
146
        }
147
148
        if (!is_array($this->entityMap[$entityName]['columnsAsAttributesMap'])) {
149
            throw new ConfigException(
@@ 148-152 (lines=5) @@
145
            );
146
        }
147
148
        if (!is_array($this->entityMap[$entityName]['columnsAsAttributesMap'])) {
149
            throw new ConfigException(
150
                sprintf("entity_map[columnsAsAttributesMap] for %s must be array", $entityName)
151
            );
152
        }
153
154
        return $this->entityMap[$entityName]['columnsAsAttributesMap'];
155
    }