Code Duplication    Length = 18-18 lines in 3 locations

tests/unit/Domain/Blog/Series/MysqlSeriesRepositoryTest.php 2 locations

@@ 355-372 (lines=18) @@
352
        );
353
    }
354
355
    protected function insertSeriesData(array $data)
356
    {
357
        $defaultData = [
358
            'id' => null,
359
            'title' => '',
360
            'description' => '',
361
        ];
362
363
        $data = array_merge($defaultData, $data);
364
365
        return self::$connection->getDefault()->perform("
366
            INSERT INTO `jpemeric_blog`.`series`
367
                (id, title, description)
368
            VALUES
369
                (:id, :title, :description)",
370
            $data
371
        );
372
    }
373
374
    protected function insertSeriesPostData(array $data)
375
    {
@@ 374-391 (lines=18) @@
371
        );
372
    }
373
374
    protected function insertSeriesPostData(array $data)
375
    {
376
        $defaultData = [
377
            'series' => '',
378
            'post' => '',
379
            'order' => 0,
380
        ];
381
382
        $data = array_merge($defaultData, $data);
383
384
        return self::$connection->getDefault()->perform("
385
            INSERT INTO `jpemeric_blog`.`series_post`
386
                (series, post, `order`)
387
            VALUES
388
                (:series, :post, :order)",
389
            $data
390
        );
391
    }
392
393
    protected function tearDown()
394
    {

tests/unit/Domain/Blog/Post/MysqlPostRepositoryTest.php 1 location

@@ 1249-1266 (lines=18) @@
1246
        );
1247
    }
1248
1249
    protected function insertSeriesPostData(array $data)
1250
    {
1251
        $defaultData = [
1252
            'series' => '',
1253
            'post' => '',
1254
            'order' => 0,
1255
        ];
1256
1257
        $data = array_merge($defaultData, $data);
1258
1259
        return self::$connection->getDefault()->perform("
1260
            INSERT INTO `jpemeric_blog`.`series_post`
1261
                (series, post, `order`)
1262
            VALUES
1263
                (:series, :post, :order)",
1264
            $data
1265
        );
1266
    }
1267
1268
    protected function insertTagData(array $data)
1269
    {