Code Duplication    Length = 7-7 lines in 2 locations

src/EntityFactory.php 1 location

@@ 130-136 (lines=7) @@
127
128
        $ucname = ucfirst($name);
129
130
        foreach ($this->namespaces as $namespace) {
131
            $class = $namespace.$ucname;
132
133
            if (class_exists($class)) {
134
                return true;
135
            }
136
        }
137
    }
138
139
    /**

src/QueryFactory.php 1 location

@@ 70-76 (lines=7) @@
67
        try {
68
            $name = ucfirst($name);
69
70
            foreach ($this->namespaces as $namespace) {
71
                $class = $namespace.$name;
72
73
                if (class_exists($class)) {
74
                    return new $class($this->entity);
75
                }
76
            }
77
        } catch (\Exception $exception) {
78
            throw new SimpleCrudException("Error getting the '{$name}' query", 0, $exception);
79
        }