Code Duplication    Length = 12-12 lines in 2 locations

database/factories/game.php 1 location

@@ 12-23 (lines=12) @@
9
10
/** @var \LaravelDoctrine\ORM\Testing\Factory $factory */
11
12
$factory->define(\Tfboe\FmLib\Tests\Entity\Game::class, function (/** @noinspection PhpUnusedParameterInspection */
13
  \Faker\Generator $faker, array $attributes) {
14
  return [
15
    'gameNumber' => $attributes['gameNumber'],
16
    'resultA' => $attributes['resultA'],
17
    'resultB' => $attributes['resultB'],
18
    'result' => $attributes['result'],
19
    'played' => $attributes['played'],
20
    'startTime' => array_key_exists('startTime', $attributes) ? $attributes['startTime'] : null,
21
    'endTime' => array_key_exists('endTime', $attributes) ? $attributes['endTime'] : null
22
  ];
23
});

database/factories/match.php 1 location

@@ 12-23 (lines=12) @@
9
10
/** @var \LaravelDoctrine\ORM\Testing\Factory $factory */
11
12
$factory->define(\Tfboe\FmLib\Tests\Entity\Match::class, function (/** @noinspection PhpUnusedParameterInspection */
13
  \Faker\Generator $faker, array $attributes) {
14
  return [
15
    'matchNumber' => $attributes['matchNumber'],
16
    'resultA' => $attributes['resultA'],
17
    'resultB' => $attributes['resultB'],
18
    'result' => $attributes['result'],
19
    'played' => $attributes['played'],
20
    'startTime' => array_key_exists('startTime', $attributes) ? $attributes['startTime'] : null,
21
    'endTime' => array_key_exists('endTime', $attributes) ? $attributes['endTime'] : null
22
  ];
23
});