Code Duplication    Length = 4-6 lines in 2 locations

models/Item.php 2 locations

@@ 218-221 (lines=4) @@
215
            return false;
216
        }
217
218
        if ($this->price * $amount > Yii::app()->player->model->dollar) {
219
            $this->errors['dollar'] = true;
220
            return false;
221
        }
222
223
        if ($this->item_type !== self::TYPE_PART) {
224
            if ($amount > Yii::app()->player->model->freeSlots) {
@@ 223-228 (lines=6) @@
220
            return false;
221
        }
222
223
        if ($this->item_type !== self::TYPE_PART) {
224
            if ($amount > Yii::app()->player->model->freeSlots) {
225
                $this->errors['freeSlots'] = true;
226
                return false;
227
            }
228
        }
229
230
        $uid = Yii::app()->player->uid;
231