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

@ -15,6 +15,8 @@ use Da\User\Query\SocialNetworkAccountQuery;
use Da\User\Traits\ContainerAwareTrait;
use Da\User\Traits\ModuleAwareTrait;
use Yii;
use yii\base\Exception;
use yii\base\InvalidParamException;
use yii\db\ActiveRecord;
use yii\helpers\Url;
@ -55,7 +57,7 @@ class SocialNetworkAccount extends ActiveRecord
*/
public function getIsConnected()
{
return $this->user_id != null;
return null !== $this->user_id;
}
/**
@ -71,6 +73,8 @@ class SocialNetworkAccount extends ActiveRecord
}
/**
* @throws Exception
* @throws InvalidParamException
* @return string the connection url
*/
public function getConnectionUrl()