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,7 @@ use Yii;
use yii\authclient\ClientInterface;
use yii\authclient\widgets\AuthChoice;
use yii\authclient\widgets\AuthChoiceAsset;
use yii\base\InvalidParamException;
use yii\helpers\Html;
use yii\helpers\Url;
@ -40,6 +41,8 @@ class ConnectWidget extends AuthChoice
/**
* {@inheritdoc}
*
* @throws InvalidParamException
*/
public function createClientUrl($provider)
{
@ -59,6 +62,6 @@ class ConnectWidget extends AuthChoice
*/
public function isConnected(ClientInterface $provider)
{
return $this->accounts != null && isset($this->accounts[$provider->getId()]);
return null !== $this->accounts && isset($this->accounts[$provider->getId()]);
}
}