Code Duplication    Length = 3-3 lines in 3 locations

src/PlaygroundGame/Service/Prize.php 1 location

@@ 43-45 (lines=3) @@
40
        $form->bind($prize);
41
42
        // If the identifier has not been set, I use the title to create one.
43
        if (empty($data['identifier']) && !empty($data['title'])) {
44
            $data['identifier'] = $data['title'];
45
        }
46
        
47
        $form->setData($data);
48

src/PlaygroundGame/Service/Game.php 2 locations

@@ 122-124 (lines=3) @@
119
        }
120
121
        // If the identifier has not been set, I use the title to create one.
122
        if (empty($data['identifier']) && ! empty($data['title'])) {
123
            $data['identifier'] = $data['title'];
124
        }
125
126
        $form->setData($data);
127
@@ 331-333 (lines=3) @@
328
            $data['publicationDate'] = $data['startDate'];
329
        }
330
331
        if ((! isset($data['identifier']) || empty($data['identifier'])) && isset($data['title'])) {
332
            $data['identifier'] = $data['title'];
333
        }
334
335
        $form->setData($data);
336