Code Duplication    Length = 10-10 lines in 2 locations

src/bill/Bill.php 1 location

@@ 132-141 (lines=10) @@
129
        return $this->id;
130
    }
131
132
    public function setId($id)
133
    {
134
        if ($this->id === $id) {
135
            return;
136
        }
137
        if ($this->id !== null) {
138
            throw new \Exception('cannot reassign bill id');
139
        }
140
        $this->id = $id;
141
    }
142
143
    /**
144
     * @return TypeInterface

src/charge/Charge.php 1 location

@@ 128-137 (lines=10) @@
125
        $this->bill = $bill;
126
    }
127
128
    public function setId($id)
129
    {
130
        if ($this->id === $id) {
131
            return;
132
        }
133
        if ($this->id !== null) {
134
            throw new \Exception('cannot reassign sale id');
135
        }
136
        $this->id = $id;
137
    }
138
139
    public function jsonSerialize()
140
    {