Code Duplication    Length = 10-10 lines in 3 locations

src/sale/Sale.php 1 location

@@ 89-98 (lines=10) @@
86
        return $this->time;
87
    }
88
89
    public function setId($id)
90
    {
91
        if ($this->id === $id) {
92
            return;
93
        }
94
        if ($this->id !== null) {
95
            throw new \Exception('cannot reassign sale id');
96
        }
97
        $this->id = $id;
98
    }
99
}
100

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

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