Close #109 provide better error classes + phpdoc fixes

This commit is contained in:
Antonio Ramirez
2017-11-12 23:13:42 +01:00
parent c418ad967c
commit 83458a13e4
26 changed files with 109 additions and 20 deletions

View File

@ -20,6 +20,7 @@ use DateTime;
use DateTimeZone;
use Exception;
use Yii;
use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
use yii\db\ActiveRecord;
@ -44,6 +45,7 @@ class Profile extends ActiveRecord
* {@inheritdoc}
*
* @throws InvalidParamException
* @throws InvalidConfigException
*/
public function beforeSave($insert)
{
@ -67,6 +69,8 @@ class Profile extends ActiveRecord
/**
* {@inheritdoc}
*
* @throws InvalidConfigException
*/
public function rules()
{
@ -125,6 +129,8 @@ class Profile extends ActiveRecord
* Set the User's timezone.
*
* @param DateTimeZone $timezone
*
* @throws InvalidParamException
*/
public function setTimeZone(DateTimeZone $timezone)
{
@ -144,6 +150,7 @@ class Profile extends ActiveRecord
}
/**
* @throws InvalidConfigException
* @return \yii\db\ActiveQuery
*/
public function getUser()
@ -154,6 +161,7 @@ class Profile extends ActiveRecord
/**
* @param int $size
*
* @throws InvalidConfigException
* @return mixed
*/
public function getAvatarUrl($size = 200)