Code Duplication    Length = 3-3 lines in 3 locations

models/Club.php 1 location

@@ 215-217 (lines=3) @@
212
    public function joinRequest($id)
213
    {
214
        $player = Yii::app()->player->model;
215
        if ($player->level < Yii::app()->params['clubJoinLevelRequirement']) {
216
            throw new CFlashException('Ahhoz, hogy csatlakozhass, el kell érned a ' . Yii::app()->params['clubJoinLevelRequirement'] . '. szintet.');
217
        }
218
219
        if ($player->in_club) {
220
            throw new CFlashException('Már tagja vagy egy másik klubnak.');

models/ClubAR.php 1 location

@@ 59-61 (lines=3) @@
56
57
    public function levelRequirement($attribute, $params)
58
    {
59
        if (Yii::app()->player->model->level < Yii::app()->params['clubCreateLevelRequirement']) {
60
            $this->addError($attribute, 'Saját klub indításához minimum ' . Yii::app()->params['clubCreateLevelRequirement'] . '. szintre kell fejlődnöd.');
61
        }
62
    }
63
64
    public function hasOtherClub($attribute, $params)

models/Duel.php 1 location

@@ 153-155 (lines=3) @@
150
            throw new CFlashException('Ahhoz, hogy párbajozhass, legalább ' . $this->caller->energyRequiredForDuel . ' energiára van szükséged.');
151
        }
152
153
        if ($this->opponent->level < Yii::app()->params['duelLevelRequirement']) {
154
            throw new CFlashException('Az ellenfél még nem párbajozhat, mivel nem érte el a szükséges ' . Yii::app()->params['duelLevelRequirement'] . '. szintet.');
155
        }
156
157
        $this->validateNonChallengeGame();
158