Code Duplication    Length = 11-11 lines in 2 locations

source/Spiral/Database/DatabaseManager.php 1 location

@@ 229-239 (lines=11) @@
226
     *
227
     * @throws DatabaseException
228
     */
229
    public function getDatabases(): array
230
    {
231
        $result = [];
232
233
        //todo: include manually added databases
234
        foreach ($this->config->databaseNames() as $name) {
235
            $result[] = $this->database($name);
236
        }
237
238
        return $result;
239
    }
240
241
    /**
242
     * Get instance of every available driver/connection.

source/Spiral/ODM/MongoManager.php 1 location

@@ 144-154 (lines=11) @@
141
     *
142
     * @return MongoDatabase[]
143
     */
144
    public function getDatabases(): array
145
    {
146
        $result = [];
147
148
        //Include manually added databases
149
        foreach ($this->config->databaseNames() as $name) {
150
            $result[] = $this->database($name);
151
        }
152
153
        return $result;
154
    }
155
156
    /**
157
     * Automatic injection of MongoDatabase.