fix formatting

This commit is contained in:
Antonio Ramirez
2016-12-14 02:50:12 +01:00
parent f3f4b31bb4
commit 3ba01b4674
140 changed files with 512 additions and 523 deletions

View File

@ -16,7 +16,7 @@ class AssignmentsWidget extends Widget
use ContainerTrait;
/**
* @var integer ID of the user to whom auth items will be assigned.
* @var int ID of the user to whom auth items will be assigned
*/
public $userId;
/**
@ -25,19 +25,20 @@ class AssignmentsWidget extends Widget
public $params = [];
/**
* @inheritdoc
* {@inheritdoc}
*
* @throws InvalidConfigException
*/
public function init()
{
parent::init();
if ($this->userId === null) {
throw new InvalidConfigException( __CLASS__ . '::$userId is required');
throw new InvalidConfigException(__CLASS__.'::$userId is required');
}
}
/**
* @inheritdoc
* {@inheritdoc}
*/
public function run()
{
@ -49,12 +50,12 @@ class AssignmentsWidget extends Widget
return $this->render('/widgets/assignments/form', [
'model' => $model,
'availableItems' => $this->getAvailableItems()
'availableItems' => $this->getAvailableItems(),
]);
}
/**
* Returns all available auth items to be attached to the user
* Returns all available auth items to be attached to the user.
*
* @return array
*/
@ -63,7 +64,7 @@ class AssignmentsWidget extends Widget
return ArrayHelper::map($this->getAuthManager()->getItems(), 'name', function ($item) {
return empty($item->description)
? $item->name
: $item->name . ' (' . $item->description . ')';
: $item->name.' ('.$item->description.')';
});
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace Da\User\Widget;
namespace Da\User\Widget;
use Yii;
use yii\authclient\ClientInterface;
@ -17,20 +17,20 @@ class ConnectWidget extends AuthChoice
public $accounts;
/**
* @inheritdoc
* {@inheritdoc}
*/
public function init()
{
AuthChoiceAsset::register(Yii::$app->view);
if ($this->popupMode) {
Yii::$app->view->registerJs("\$('#" . $this->getId() . "').authchoice();");
Yii::$app->view->registerJs("\$('#".$this->getId()."').authchoice();");
}
$this->options['id'] = $this->getId();
echo Html::beginTag('div', $this->options);
}
/**
* @inheritdoc
* {@inheritdoc}
*/
public function createClientUrl($provider)
{

View File

@ -1,4 +1,5 @@
<?php
namespace Da\User\Widget;
use Da\User\Form\LoginForm;
@ -14,7 +15,7 @@ class LoginWidget extends Widget
return $this->render(
'/widgets/login',
[
'model' => Yii::createObject(LoginForm::class)
'model' => Yii::createObject(LoginForm::class),
]
);
}