Code Duplication    Length = 14-17 lines in 2 locations

src/Fwlib/Test/AbstractDbRelateTest.php 2 locations

@@ 228-244 (lines=17) @@
225
    }
226
227
228
    public static function setUpBeforeClass()
229
    {
230
        self::connectDb(static::$dbUsing);
231
232
        // Create test table
233
        if (!is_null(self::$dbMysql) && self::$dbMysql->isConnected()) {
234
            self::createTable(self::$dbMysql);
235
        }
236
        if (!is_null(self::$dbSybase) && self::$dbSybase->isConnected()) {
237
            self::createTable(self::$dbSybase);
238
        }
239
240
        if (!is_null(self::$db) && self::$db->isConnected() &&
241
            !self::$db->isTableExist(self::$tableUser)) {
242
            self::createTable(self::$db);
243
        }
244
    }
245
246
247
    public static function tearDownAfterClass()
@@ 247-260 (lines=14) @@
244
    }
245
246
247
    public static function tearDownAfterClass()
248
    {
249
        if (!is_null(self::$dbMysql) && self::$dbMysql->isConnected()) {
250
            self::dropTable(self::$dbMysql);
251
        }
252
        if (!is_null(self::$dbSybase) && self::$dbSybase->isConnected()) {
253
            self::dropTable(self::$dbSybase);
254
        }
255
256
        if (!is_null(self::$db) && self::$db->isConnected() &&
257
            self::$db->isTableExist(self::$tableUser)) {
258
            self::dropTable(self::$db);
259
        }
260
    }
261
}
262