Code Duplication    Length = 12-14 lines in 2 locations

src/logic/DomainTariffManager.php 2 locations

@@ 39-52 (lines=14) @@
36
            ->fill($this->getZones(), $this->baseTariff, $tariff);
37
    }
38
39
    public function insert()
40
    {
41
        $data = $this->form->toArray();
42
43
        try {
44
            $result = Tariff::perform('Create', $data);
45
        } catch (ErrorResponseException $e) {
46
            throw new UnprocessableEntityHttpException($e->getMessage(), 0, $e);
47
        }
48
49
        $this->form->id = $result['id'];
50
51
        return true;
52
    }
53
54
    public function update()
55
    {
@@ 54-65 (lines=12) @@
51
        return true;
52
    }
53
54
    public function update()
55
    {
56
        $data = $this->form->toArray();
57
58
        try {
59
            $result = Tariff::perform('Update', $data);
60
        } catch (ErrorResponseException $e) {
61
            throw new UnprocessableEntityHttpException($e->getMessage(), 0, $e);
62
        }
63
64
        return true;
65
    }
66
67
    /**
68
     * @return array