Code Duplication    Length = 8-9 lines in 2 locations

src/Autocreate/Handlers/OnBeforeGroupAdd.php 1 location

@@ 16-23 (lines=8) @@
13
     *
14
     * @throws StopHandlerException
15
     */
16
    public function __construct($params)
17
    {
18
        $this->fields = $params[0];
19
20
        if (!$this->fields['STRING_ID']) {
21
            throw new StopHandlerException('Code is required to create a migration');
22
        }
23
    }
24
25
    /**
26
     * Get migration name.

src/Autocreate/Handlers/OnBeforeGroupUpdate.php 1 location

@@ 23-31 (lines=9) @@
20
     *
21
     * @throws StopHandlerException
22
     */
23
    public function __construct($params)
24
    {
25
        $this->id = $params[0];
26
        $this->fields = $params[1];
27
28
        if (!$this->fields['STRING_ID']) {
29
            throw new StopHandlerException('Code is required to create a migration');
30
        }
31
    }
32
33
    /**
34
     * Get migration name.