Code Duplication    Length = 17-17 lines in 4 locations

tests/unit/Domain/Blog/Tag/MysqlTagRepositoryTest.php 2 locations

@@ 474-490 (lines=17) @@
471
        );
472
    }
473
474
    protected function insertPTLinkData(array $data)
475
    {
476
        $defaultData = [
477
            'post' => null,
478
            'tag' => null,
479
        ];
480
481
        $data = array_merge($defaultData, $data);
482
483
        return self::$connection->getDefault()->perform("
484
            INSERT INTO `jpemeric_blog`.`ptlink`
485
                (post_id, tag_id)
486
            VALUES
487
                (:post_id, :tag_id)",
488
            $data
489
        );
490
    }
491
492
    protected function insertTagData(array $data)
493
    {
@@ 492-508 (lines=17) @@
489
        );
490
    }
491
492
    protected function insertTagData(array $data)
493
    {
494
        $defaultData = [
495
            'id' => null,
496
            'tag' => '',
497
        ];
498
499
        $data = array_merge($defaultData, $data);
500
501
        return self::$connection->getDefault()->perform("
502
            INSERT INTO `jpemeric_blog`.`tag`
503
                (id, tag)
504
            VALUES
505
                (:id, :tag)",
506
            $data
507
        );
508
    }
509
510
    protected function tearDown()
511
    {

tests/unit/Domain/Blog/Post/MysqlPostRepositoryTest.php 2 locations

@@ 1240-1256 (lines=17) @@
1237
        );
1238
    }
1239
1240
    protected function insertPTLinkData(array $data)
1241
    {
1242
        $defaultData = [
1243
            'post' => null,
1244
            'tag' => null,
1245
        ];
1246
1247
        $data = array_merge($defaultData, $data);
1248
1249
        return self::$connection->getDefault()->perform("
1250
            INSERT INTO `jpemeric_blog`.`ptlink`
1251
                (post_id, tag_id)
1252
            VALUES
1253
                (:post_id, :tag_id)",
1254
            $data
1255
        );
1256
    }
1257
1258
    protected function insertSeriesPostData(array $data)
1259
    {
@@ 1277-1293 (lines=17) @@
1274
        );
1275
    }
1276
1277
    protected function insertTagData(array $data)
1278
    {
1279
        $defaultData = [
1280
            'id' => null,
1281
            'tag' => '',
1282
        ];
1283
1284
        $data = array_merge($defaultData, $data);
1285
1286
        return self::$connection->getDefault()->perform("
1287
            INSERT INTO `jpemeric_blog`.`tag`
1288
                (id, tag)
1289
            VALUES
1290
                (:id, :tag)",
1291
            $data
1292
        );
1293
    }
1294
1295
    protected function tearDown()
1296
    {