Code Duplication    Length = 9-9 lines in 2 locations

src/Models/Billing.php 1 location

@@ 23-31 (lines=9) @@
20
     *
21
     * @return $this
22
     */
23
    public function paid_by($value)
24
    {
25
        if ($value == 'shipper' || $value == 'third_party') {
26
            $this->paid_by = $value;
27
        } else {
28
            $error = 'Paid by must be shipper or third_party';
29
            throw new \Exception($error);
30
        }
31
32
        return $this;
33
    }
34

src/Models/CustomsBilling.php 1 location

@@ 20-28 (lines=9) @@
17
     *
18
     * @return $this
19
     */
20
    public function paid_by($value)
21
    {
22
        if ($value == 'shipper' || $value == 'third_party' || $value == 'recipient') {
23
            $this->paid_by = $value;
24
        } else {
25
            $error = 'Paid by must be shipper or third_party';
26
            throw new \Exception($error);
27
        }
28
29
        return $this;
30
    }
31
}