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

@ -3,7 +3,7 @@
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
/**
/*
* @var yii\web\View $this
* @var \Da\User\Model\User $user
*/

View File

@ -2,7 +2,7 @@
use Da\User\Widget\AssignmentsWidget;
/**
/*
* @var yii\web\View $this
* @var \Da\User\Model\User $user
* @var string[] $params

View File

@ -1,7 +1,7 @@
<?php
/**
* @var yii\web\View $this
* @var yii\web\View
* @var \Da\User\Model\User $user
*/
?>

View File

@ -3,7 +3,7 @@
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
/**
/*
* @var yii\web\View $this
* @var \Da\User\Model\User $user
* @var \Da\User\Model\Profile $profile

View File

@ -1,7 +1,7 @@
<?php
/**
* @var yii\widgets\ActiveForm $form
* @var \Da\User\Model\User $user
* @var yii\widgets\ActiveForm
* @var \Da\User\Model\User $user
*/
?>

View File

@ -4,7 +4,7 @@ use yii\bootstrap\ActiveForm;
use yii\bootstrap\Nav;
use yii\helpers\Html;
/**
/*
* @var yii\web\View $this
* @var \Da\User\Model\User $user
*/
@ -42,21 +42,21 @@ $this->params['breadcrumbs'][] = $this->title;
'items' => [
[
'label' => Yii::t('user', 'Account details'),
'url' => ['/user/admin/create']
'url' => ['/user/admin/create'],
],
[
'label' => Yii::t('user', 'Profile details'),
'options' => [
'class' => 'disabled',
'onclick' => 'return false;',
]
],
],
[
'label' => Yii::t('user', 'Information'),
'options' => [
'class' => 'disabled',
'onclick' => 'return false;',
]
],
],
],
]

View File

@ -7,7 +7,7 @@ use yii\helpers\Html;
use yii\web\View;
use yii\widgets\Pjax;
/**
/*
* @var View $this
* @var ActiveDataProvider $dataProvider
* @var UserSearch $searchModel
@ -33,7 +33,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'registration_ip',
'value' => function ($model) {
return $model->registration_ip == null
? '<span class="not-set">' . Yii::t('user', '(not set)') . '</span>'
? '<span class="not-set">'.Yii::t('user', '(not set)').'</span>'
: $model->registration_ip;
},
'format' => 'html',
@ -53,7 +53,7 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => function ($model) {
if ($model->isConfirmed) {
return '<div class="text-center">
<span class="text-success">' . Yii::t('user', 'Confirmed') . '</span>
<span class="text-success">' .Yii::t('user', 'Confirmed').'</span>
</div>';
} else {
return Html::a(

View File

@ -5,7 +5,7 @@ use yii\bootstrap\Nav;
use yii\web\View;
use yii\helpers\Html;
/**
/*
* @var View $this
* @var User $user
* @var string $content
@ -44,15 +44,15 @@ $this->params['breadcrumbs'][] = $this->title;
'items' => [
[
'label' => Yii::t('user', 'Account details'),
'url' => ['/user/admin/update', 'id' => $user->id]
'url' => ['/user/admin/update', 'id' => $user->id],
],
[
'label' => Yii::t('user', 'Profile details'),
'url' => ['/user/admin/update-profile', 'id' => $user->id]
'url' => ['/user/admin/update-profile', 'id' => $user->id],
],
[
'label' => Yii::t('user', 'Information'),
'url' => ['/user/admin/info', 'id' => $user->id]
'url' => ['/user/admin/info', 'id' => $user->id],
],
[
'label' => Yii::t('user', 'Assignments'),

View File

@ -2,7 +2,7 @@
use yii\helpers\Html;
/**
/*
* @var \Da\User\Model\User $user
* @var \Da\User\Model\Token $token
*/

View File

@ -1,6 +1,6 @@
<?php
/**
* @var \yii\web\View $this
* @var \yii\web\View
* @var yii\mail\BaseMessage $content
*/
?>

View File

@ -1,6 +1,6 @@
<?php
/**
* @var string $content main view render result
* @var string main view render result
*/
?>

View File

@ -1,7 +1,7 @@
<?php
use yii\helpers\Html;
/**
/*
* @var \Da\User\Model\Token $token
*/
?>

View File

@ -2,7 +2,7 @@
use yii\helpers\Html;
/**
/*
* @var \Da\User\Model\User $user
* @var \Da\User\Model\Token $token
*/

View File

@ -1,8 +1,8 @@
<?php
/**
* @var \Da\User\Model\User $user
* @var \Da\User\Model\Token $token
* @var \Da\User\Model\User
* @var \Da\User\Model\Token $token
*/
?>
<?= Yii::t('user', 'Hello') ?>,

View File

@ -1,6 +1,6 @@
<?php
/**
* @var \Da\User\Model\Token $token
* @var \Da\User\Model\Token
*/
?>
<?= Yii::t('user', 'Hello') ?>,

View File

@ -1,7 +1,7 @@
<?php
/**
* @var \Da\User\Model\User $user
* @var \Da\User\Model\Token $token
* @var \Da\User\Model\User
* @var \Da\User\Model\Token $token
*/
?>
<?= Yii::t('user', 'Hello') ?>,

View File

@ -1,9 +1,9 @@
<?php
/**
* @var \Da\User\Model\User $user
* @var \Da\User\Model\User
* @var \Da\User\Model\Token $token
* @var \Da\User\Module $module
* @var \Da\User\Module $module
*/
?>
<?= Yii::t('user', 'Hello') ?>,

View File

@ -1,7 +1,7 @@
<?php
use yii\helpers\Html;
/**
/*
* @var \Da\User\Module $module
* @var \Da\User\Model\User $user
* @var \Da\User\Model\Token $token

View File

@ -1,11 +1,10 @@
<?php
/**
* @var $this yii\web\View
* @var $model \Da\User\Model\Permission
* @var yii\web\View
* @var $model \Da\User\Model\Permission
* @var $unassignedItems string[]
*/
use kartik\select2\Select2;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
@ -14,7 +13,7 @@ use yii\helpers\Html;
<?php $form = ActiveForm::begin([
'enableClientValidation' => false,
'enableAjaxValidation' => true,
'enableAjaxValidation' => true,
]) ?>
<?= $form->field($model, 'name') ?>
@ -27,7 +26,7 @@ use yii\helpers\Html;
'data' => $unassignedItems,
'options' => [
'id' => 'children',
'multiple' => true
'multiple' => true,
],
]) ?>

View File

@ -1,11 +1,10 @@
<?php
/**
* @var $model \Da\User\Model\Permission
* @var $this yii\web\View
* @var $unassignedItems string[]
* @var \Da\User\Model\Permission
* @var $this yii\web\View
* @var $unassignedItems string[]
*/
$this->title = Yii::t('user', 'Create new permission');
$this->params['breadcrumbs'][] = $this->title;
@ -17,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
'_form',
[
'model' => $model,
'unassignedItems' => $unassignedItems
'unassignedItems' => $unassignedItems,
]
) ?>

View File

@ -1,11 +1,10 @@
<?php
/**
* @var $dataProvider array
* @var $this yii\web\View
* @var $searchModel \Da\User\Search\PermissionSearch
* @var array
* @var $this yii\web\View
* @var $searchModel \Da\User\Search\PermissionSearch
*/
use yii\grid\ActionColumn;
use yii\grid\GridView;
use yii\helpers\Url;
@ -27,33 +26,33 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'name',
'header' => Yii::t('user', 'Name'),
'options' => [
'style' => 'width: 20%'
'style' => 'width: 20%',
],
],
[
'attribute' => 'description',
'header' => Yii::t('user', 'Description'),
'options' => [
'style' => 'width: 55%'
'style' => 'width: 55%',
],
],
[
'attribute' => 'rule_name',
'header' => Yii::t('user', 'Rule name'),
'options' => [
'style' => 'width: 20%'
'style' => 'width: 20%',
],
],
[
'class' => ActionColumn::className(),
'template' => '{update} {delete}',
'urlCreator' => function ($action, $model) {
return Url::to(['/user/permission/' . $action, 'name' => $model['name']]);
return Url::to(['/user/permission/'.$action, 'name' => $model['name']]);
},
'options' => [
'style' => 'width: 5%'
'style' => 'width: 5%',
],
]
],
],
]
) ?>

View File

@ -1,11 +1,10 @@
<?php
/**
* @var $model \Da\User\Model\Permission
* @var $this yii\web\View
* @var $unassignedItems string[]
* @var \Da\User\Model\Permission
* @var $this yii\web\View
* @var $unassignedItems string[]
*/
$this->title = Yii::t('user', 'Update permission');
$this->params['breadcrumbs'][] = $this->title;
@ -17,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
'_form',
[
'model' => $model,
'unassignedItems' => $unassignedItems
'unassignedItems' => $unassignedItems,
]
) ?>

View File

@ -2,7 +2,7 @@
use yii\helpers\Html;
/**
/*
* @var \yii\web\View $this
* @var \Da\User\Model\Profile $profile
*/
@ -16,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="col-sm-6 col-md-4">
<?= Html::img($profile->getAvatarUrl(230), [
'class' => 'img-rounded img-responsive',
'alt' => $profile->user->username,
'alt' => $profile->user->username,
]) ?>
</div>
<div class="col-sm-6 col-md-8">
@ -37,7 +37,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php if (!empty($profile->public_email)): ?>
<li>
<i class="glyphicon glyphicon-envelope text-muted"></i>
<?= Html::a(Html::encode($profile->public_email), 'mailto:' .
<?= Html::a(Html::encode($profile->public_email), 'mailto:'.
Html::encode($profile->public_email))
?>
</li>

View File

@ -2,7 +2,7 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
/*
* @var yii\web\View $this
* @var yii\widgets\ActiveForm $form
* @var \Da\User\Form\RecoveryForm $model

View File

@ -3,7 +3,7 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
/*
* @var yii\web\View $this
* @var yii\widgets\ActiveForm $form
* @var \Da\User\Form\RecoveryForm $model

View File

@ -2,7 +2,7 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
/*
* @var yii\web\View $this
* @var yii\widgets\ActiveForm $form
* @var \Da\User\Model\User $model

View File

@ -3,7 +3,7 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
/*
* @var yii\web\View $this
* @var \Da\User\Form\RegistrationForm $model
* @var \Da\User\Model\User $user

View File

@ -2,7 +2,7 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
/*
* @var yii\web\View $this
* @var \Da\User\Form\ResendForm $model
*/

View File

@ -1,8 +1,8 @@
<?php
/**
* @var $this yii\web\View
* @var $model \Da\User\Model\Role
* @var yii\web\View
* @var $model \Da\User\Model\Role
*/
use Da\User\Helper\AuthHelper;
use kartik\select2\Select2;
@ -31,7 +31,7 @@ $unassignedItems = Yii::$container->get(AuthHelper::class)->getUnassignedItems($
'data' => $unassignedItems,
'options' => [
'id' => 'children',
'multiple' => true
'multiple' => true,
],
]
) ?>

View File

@ -1,11 +1,10 @@
<?php
/**
* @var $model \Da\User\Model\Role
* @var $this yii\web\View
* @var $unassignedItems string[]
* @var \Da\User\Model\Role
* @var $this yii\web\View
* @var $unassignedItems string[]
*/
$this->title = Yii::t('user', 'Create new role');
$this->params['breadcrumbs'][] = $this->title;
@ -17,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
'_form',
[
'model' => $model,
'unassignedItems' => $unassignedItems
'unassignedItems' => $unassignedItems,
]
) ?>

View File

@ -3,13 +3,12 @@ use yii\grid\ActionColumn;
use yii\grid\GridView;
use yii\helpers\Url;
/**
/*
* @var $dataProvider array
* @var $searchModel \Da\User\Search\RoleSearch
* @var $this yii\web\View
*/
$this->title = Yii::t('user', 'Roles');
$this->params['breadcrumbs'][] = $this->title;
@ -27,33 +26,33 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'name',
'header' => Yii::t('user', 'Name'),
'options' => [
'style' => 'width: 20%'
'style' => 'width: 20%',
],
],
[
'attribute' => 'description',
'header' => Yii::t('user', 'Description'),
'options' => [
'style' => 'width: 55%'
'style' => 'width: 55%',
],
],
[
'attribute' => 'rule_name',
'header' => Yii::t('user', 'Rule name'),
'options' => [
'style' => 'width: 20%'
'style' => 'width: 20%',
],
],
[
'class' => ActionColumn::className(),
'template' => '{update} {delete}',
'urlCreator' => function ($action, $model) {
return Url::to(['/user/role/' . $action, 'name' => $model['name']]);
return Url::to(['/user/role/'.$action, 'name' => $model['name']]);
},
'options' => [
'style' => 'width: 5%'
'style' => 'width: 5%',
],
]
],
],
]
) ?>

View File

@ -1,11 +1,10 @@
<?php
/**
* @var $model \Da\User\Model\Role
* @var $this yii\web\View
* @var $unassignedItems string[]
* @var \Da\User\Model\Role
* @var $this yii\web\View
* @var $unassignedItems string[]
*/
$this->title = Yii::t('user', 'Update role');
$this->params['breadcrumbs'][] = $this->title;
@ -17,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
'_form',
[
'model' => $model,
'unassignedItems' => $unassignedItems
'unassignedItems' => $unassignedItems,
]
) ?>

View File

@ -4,7 +4,7 @@ use Da\User\Widget\ConnectWidget;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
/*
* @var yii\web\View $this
* @var \Da\User\Form\LoginForm $model
* @var \Da\User\Module $module
@ -49,13 +49,13 @@ $this->params['breadcrumbs'][] = $this->title;
->passwordInput()
->label(
Yii::t('user', 'Password')
. ($module->allowPasswordRecovery ?
' (' . Html::a(
.($module->allowPasswordRecovery ?
' ('.Html::a(
Yii::t('user', 'Forgot password?'),
['/user/recovery/request'],
['tabindex' => '5']
)
. ')' : '')
.')' : '')
) ?>
<?= $form->field($model, 'rememberMe')->checkbox(['tabindex' => '4']) ?>

View File

@ -34,7 +34,7 @@ $networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
[
'label' => Yii::t('user', 'Networks'),
'url' => ['/user/settings/networks'],
'visible' => $networksVisible
'visible' => $networksVisible,
],
],
]

View File

@ -3,7 +3,7 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
/*
* @var yii\web\View $this
* @var yii\widgets\ActiveForm $form
* @var \Da\User\Form\SettingsForm $model
@ -27,13 +27,13 @@ $this->params['breadcrumbs'][] = $this->title;
</div>
<div class="panel-body">
<?php $form = ActiveForm::begin([
'id' => $model->formName(),
'options' => ['class' => 'form-horizontal'],
'id' => $model->formName(),
'options' => ['class' => 'form-horizontal'],
'fieldConfig' => [
'template' => "{label}\n<div class=\"col-lg-9\">{input}</div>\n<div class=\"col-sm-offset-3 col-lg-9\">{error}\n{hint}</div>",
'template' => "{label}\n<div class=\"col-lg-9\">{input}</div>\n<div class=\"col-sm-offset-3 col-lg-9\">{error}\n{hint}</div>",
'labelOptions' => ['class' => 'col-lg-3 control-label'],
],
'enableAjaxValidation' => true,
'enableAjaxValidation' => true,
'enableClientValidation' => false,
]); ?>
@ -69,8 +69,8 @@ $this->params['breadcrumbs'][] = $this->title;
<?= Yii::t('user', 'Please be certain') ?>.
</p>
<?= Html::a(Yii::t('user', 'Delete account'), ['delete'], [
'class' => 'btn btn-danger',
'data-method' => 'post',
'class' => 'btn btn-danger',
'data-method' => 'post',
'data-confirm' => Yii::t('user', 'Are you sure? There is no going back'),
]) ?>
</div>

View File

@ -3,7 +3,7 @@
use Da\User\Widget\ConnectWidget;
use yii\helpers\Html;
/**
/*
* @var yii\web\View $this
* @var yii\widgets\ActiveForm $form
* @var \Da\User\Model\User $user
@ -42,7 +42,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php foreach ($auth->getClients() as $client): ?>
<tr>
<td style="width: 32px; vertical-align: middle">
<?= Html::tag('span', '', ['class' => 'auth-icon ' . $client->getName()]) ?>
<?= Html::tag('span', '', ['class' => 'auth-icon '.$client->getName()]) ?>
</td>
<td style="vertical-align: middle">
<strong><?= $client->getTitle() ?></strong>

View File

@ -5,7 +5,7 @@ use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use Da\User\Helper\TimezoneHelper;
/**
/*
* @var yii\web\View $this
* @var yii\widgets\ActiveForm $form
* @var \Da\User\Model\Profile $model
@ -55,7 +55,7 @@ $timezoneHelper = $model->make(TimezoneHelper::class);
<?= $form
->field($model, 'timezone')
->dropDownList(ArrayHelper::map($timezoneHelper->getAll(),'timezone','name'));
->dropDownList(ArrayHelper::map($timezoneHelper->getAll(), 'timezone', 'name'));
?>
<?= $form
->field($model, 'gravatar_email')

View File

@ -2,7 +2,7 @@
use yii\bootstrap\Alert;
/**
/*
* @var \Da\User\Module $module
*/
?>
@ -14,7 +14,7 @@ use yii\bootstrap\Alert;
<?php if (in_array($type, ['success', 'danger', 'warning', 'info'])): ?>
<?= Alert::widget([
'options' => ['class' => 'alert-dismissible alert-'.$type],
'body' => $message
'body' => $message,
]) ?>
<?php endif ?>
<?php endforeach ?>

View File

@ -17,11 +17,11 @@ use yii\bootstrap\Nav;
],
[
'label' => Yii::t('user', 'Roles'),
'url' => ['/user/role/index']
'url' => ['/user/role/index'],
],
[
'label' => Yii::t('user', 'Permissions'),
'url' => ['/user/permission/index']
'url' => ['/user/permission/index'],
],
[
'label' => Yii::t('user', 'Create'),
@ -32,11 +32,11 @@ use yii\bootstrap\Nav;
],
[
'label' => Yii::t('user', 'New role'),
'url' => ['/user/role/create']
'url' => ['/user/role/create'],
],
[
'label' => Yii::t('user', 'New permission'),
'url' => ['/user/permission/create']
'url' => ['/user/permission/create'],
],
],
],

View File

@ -1,11 +1,10 @@
<?php
/**
* @var yii\web\View $this
* @var yii\web\View
* @var \Da\User\Module $module
* @var string $title
* @var string $title
*/
$this->title = $title;
?>

View File

@ -5,7 +5,7 @@ use yii\bootstrap\Alert;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
/*
* @var $model \Da\User\Model\Assignment
* @var $availableItems string[]
*/
@ -16,7 +16,7 @@ use yii\widgets\ActiveForm;
<?= Alert::widget([
'options' => [
'class' => 'alert-success'
'class' => 'alert-success',
],
'body' => Yii::t('user', 'Assignments have been updated'),
]) ?>
@ -25,7 +25,7 @@ use yii\widgets\ActiveForm;
<?php $form = ActiveForm::begin([
'enableClientValidation' => false,
'enableAjaxValidation' => false,
'enableAjaxValidation' => false,
]) ?>
<?= Html::activeHiddenInput($model, 'user_id') ?>
@ -34,7 +34,7 @@ use yii\widgets\ActiveForm;
'data' => $availableItems,
'options' => [
'id' => 'items',
'multiple' => true
'multiple' => true,
],
]) ?>

View File

@ -13,7 +13,7 @@ use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
/**
/*
* @var yii\web\View $this
* @var yii\widgets\ActiveForm $form
* @var dektrium\user\models\LoginForm $model
@ -24,13 +24,13 @@ use yii\helpers\Html;
<?php if (Yii::$app->user->isGuest): ?>
<?php $form = ActiveForm::begin([
'id' => 'login-widget-form',
'action' => Url::to(['/user/security/login']),
'enableAjaxValidation' => true,
'id' => 'login-widget-form',
'action' => Url::to(['/user/security/login']),
'enableAjaxValidation' => true,
'enableClientValidation' => false,
'validateOnBlur' => false,
'validateOnType' => false,
'validateOnChange' => false,
'validateOnBlur' => false,
'validateOnType' => false,
'validateOnChange' => false,
]) ?>
<?= $form->field($model, 'login')->textInput(['placeholder' => 'Login']) ?>
@ -44,7 +44,7 @@ use yii\helpers\Html;
<?php ActiveForm::end(); ?>
<?php else: ?>
<?= Html::a(Yii::t('user', 'Logout'), ['/user/security/logout'], [
'class' => 'btn btn-danger btn-block',
'data-method' => 'post'
'class' => 'btn btn-danger btn-block',
'data-method' => 'post',
]) ?>
<?php endif ?>