Merge pull request #12 from maximal/patch-1

Remove redundant `else`s
This commit is contained in:
Carsten Brandt 2015-06-05 17:50:06 +02:00
commit 038192fe50
3 changed files with 8 additions and 12 deletions

View File

@ -61,12 +61,11 @@ class SiteController extends Controller
$model = new LoginForm();
if ($model->load(Yii::$app->request->post()) && $model->login()) {
return $this->goBack();
} else {
}
return $this->render('login', [
'model' => $model,
]);
}
}
public function actionLogout()
{
@ -82,12 +81,11 @@ class SiteController extends Controller
Yii::$app->session->setFlash('contactFormSubmitted');
return $this->refresh();
} else {
}
return $this->render('contact', [
'model' => $model,
]);
}
}
public function actionAbout()
{

View File

@ -57,8 +57,7 @@ class ContactForm extends Model
->send();
return true;
} else {
}
return false;
}
}
}

View File

@ -58,9 +58,8 @@ class LoginForm extends Model
{
if ($this->validate()) {
return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0);
} else {
return false;
}
return false;
}
/**