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.')';
});
}
}