@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function getLabel() |
| 37 | 37 | { |
| 38 | - return $this->getName() . ' <small>(' . count($this->_model->trails) . ')</small>'; |
|
| 38 | + return $this->getName().' <small>('.count($this->_model->trails).')</small>'; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | $style = YII_DEBUG ? '' : 'color:transparent;'; |
| 13 | 13 | } |
| 14 | 14 | if (Access::checkAccess()) { |
| 15 | - echo Html::a('audit-' . $auditEntry->id, ['/audit/entry/view', 'id' => $auditEntry->id], ['style' => $style]); |
|
| 15 | + echo Html::a('audit-'.$auditEntry->id, ['/audit/entry/view', 'id' => $auditEntry->id], ['style' => $style]); |
|
| 16 | 16 | } else { |
| 17 | - echo Html::tag('span', 'audit-' . $auditEntry->id, ['style' => $style]); |
|
| 17 | + echo Html::tag('span', 'audit-'.$auditEntry->id, ['style' => $style]); |
|
| 18 | 18 | } |
| 19 | 19 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | if (empty($columns) || in_array('user_id', $columns)) { |
| 38 | 38 | $_columns[] = [ |
| 39 | 39 | 'attribute' => 'user_id', |
| 40 | - 'value' => function ($data) { |
|
| 40 | + 'value' => function($data) { |
|
| 41 | 41 | return Audit::getInstance()->getUserIdentifier($data->user_id); |
| 42 | 42 | }, |
| 43 | 43 | 'format' => 'raw', |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | if (empty($columns) || in_array('entry_id', $columns)) { |
| 47 | 47 | $_columns[] = [ |
| 48 | 48 | 'attribute' => 'entry_id', |
| 49 | - 'value' => function ($model) { |
|
| 49 | + 'value' => function($model) { |
|
| 50 | 50 | /** @var AuditTrail $model */ |
| 51 | 51 | if (Access::checkAccess()) { |
| 52 | 52 | return Html::a($model->entry_id, ['/audit/entry/view', 'id' => $model->entry_id]); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | if (empty($columns) || in_array('diff', $columns)) { |
| 78 | 78 | $_columns[] = [ |
| 79 | 79 | 'label' => Yii::t('audit', 'Diff'), |
| 80 | - 'value' => function ($model) { |
|
| 80 | + 'value' => function($model) { |
|
| 81 | 81 | /** @var AuditTrail $model */ |
| 82 | 82 | return $model->getDiffHtml(); |
| 83 | 83 | }, |
@@ -94,12 +94,12 @@ discard block |
||
| 94 | 94 | 'linkSelector' => '#pjax-AuditTrails ul.pagination a, th a', |
| 95 | 95 | ]); |
| 96 | 96 | |
| 97 | -echo '<div class="table-responsive">' . GridView::widget([ |
|
| 97 | +echo '<div class="table-responsive">'.GridView::widget([ |
|
| 98 | 98 | 'layout' => '{summary}{pager}<br/>{items}{pager}', |
| 99 | 99 | 'dataProvider' => $auditTrailDataProvider, |
| 100 | 100 | 'filterModel' => $filter ? $auditTrailSearch : null, |
| 101 | 101 | 'columns' => $_columns, |
| 102 | - ]) . '</div>'; |
|
| 102 | + ]).'</div>'; |
|
| 103 | 103 | |
| 104 | 104 | Pjax::end(); |
| 105 | 105 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | 'attribute' => 'user_id', |
| 28 | 28 | 'label' => Yii::t('audit', 'User'), |
| 29 | 29 | 'class' => 'yii\grid\DataColumn', |
| 30 | - 'value' => function ($data) { |
|
| 30 | + 'value' => function($data) { |
|
| 31 | 31 | return Audit::getInstance()->getUserIdentifier($data->user_id); |
| 32 | 32 | }, |
| 33 | 33 | 'format' => 'raw', |
@@ -49,11 +49,11 @@ discard block |
||
| 49 | 49 | 'attribute' => 'route', |
| 50 | 50 | 'filter' => AuditEntrySearch::routeFilter(), |
| 51 | 51 | 'format' => 'html', |
| 52 | - 'value' => function ($data) { |
|
| 52 | + 'value' => function($data) { |
|
| 53 | 53 | return HTML::tag('span', '', [ |
| 54 | 54 | 'title' => \yii\helpers\Url::to([$data->route]), |
| 55 | 55 | 'class' => 'glyphicon glyphicon-link' |
| 56 | - ]) . ' ' . $data->route; |
|
| 56 | + ]).' '.$data->route; |
|
| 57 | 57 | }, |
| 58 | 58 | ], |
| 59 | 59 | [ |
@@ -68,28 +68,28 @@ discard block |
||
| 68 | 68 | ], |
| 69 | 69 | [ |
| 70 | 70 | 'attribute' => 'trails', |
| 71 | - 'value' => function ($data) { |
|
| 71 | + 'value' => function($data) { |
|
| 72 | 72 | return $data->trails ? count($data->trails) : ''; |
| 73 | 73 | }, |
| 74 | 74 | 'contentOptions' => ['class' => 'text-right'], |
| 75 | 75 | ], |
| 76 | 76 | [ |
| 77 | 77 | 'attribute' => 'mails', |
| 78 | - 'value' => function ($data) { |
|
| 78 | + 'value' => function($data) { |
|
| 79 | 79 | return $data->mails ? count($data->mails) : ''; |
| 80 | 80 | }, |
| 81 | 81 | 'contentOptions' => ['class' => 'text-right'], |
| 82 | 82 | ], |
| 83 | 83 | [ |
| 84 | 84 | 'attribute' => 'javascripts', |
| 85 | - 'value' => function ($data) { |
|
| 85 | + 'value' => function($data) { |
|
| 86 | 86 | return $data->javascripts ? count($data->javascripts) : ''; |
| 87 | 87 | }, |
| 88 | 88 | 'contentOptions' => ['class' => 'text-right'], |
| 89 | 89 | ], |
| 90 | 90 | [ |
| 91 | 91 | 'attribute' => 'errors', |
| 92 | - 'value' => function ($data) { |
|
| 92 | + 'value' => function($data) { |
|
| 93 | 93 | return $data->linkedErrors ? count($data->linkedErrors) : ''; |
| 94 | 94 | }, |
| 95 | 95 | 'contentOptions' => ['class' => 'text-right'], |
@@ -26,13 +26,13 @@ |
||
| 26 | 26 | if (preg_match('/_{0,1}(size|length)_{0,1}/', $name)) |
| 27 | 27 | echo $formatter->asSize($value); |
| 28 | 28 | else if (strpos($name, 'speed') !== false) |
| 29 | - echo $formatter->asSize($value) . '/s'; |
|
| 29 | + echo $formatter->asSize($value).'/s'; |
|
| 30 | 30 | else if (strpos($name, 'time') !== false && is_numeric($value) && $value >= 0) |
| 31 | - echo number_format($value, 2) . 's'; |
|
| 31 | + echo number_format($value, 2).'s'; |
|
| 32 | 32 | else if ($name == 'http_code') { |
| 33 | 33 | $type = substr($value, 0, 1); |
| 34 | - echo Html::tag('span', $value . (isset(Response::$httpStatuses[$value]) ? (' (' . Response::$httpStatuses[$value] . ')') : ''), |
|
| 35 | - ['style' => 'color: '. ($type == 2 ? 'green' : ($type == 4 || $type == 5 ? 'red' : 'orange'))]); |
|
| 34 | + echo Html::tag('span', $value.(isset(Response::$httpStatuses[$value]) ? (' ('.Response::$httpStatuses[$value].')') : ''), |
|
| 35 | + ['style' => 'color: '.($type == 2 ? 'green' : ($type == 4 || $type == 5 ? 'red' : 'orange'))]); |
|
| 36 | 36 | } |
| 37 | 37 | else |
| 38 | 38 | echo htmlspecialchars(VarDumper::dumpAsString($value), ENT_QUOTES|ENT_SUBSTITUTE, \Yii::$app->charset, true) |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | 'class' => 'yii\grid\ActionColumn', |
| 20 | 20 | 'template' => '{view}', |
| 21 | 21 | 'buttons' => [ |
| 22 | - 'view' => function ($url, $model) { |
|
| 22 | + 'view' => function($url, $model) { |
|
| 23 | 23 | return Html::a( |
| 24 | 24 | Html::tag('span', '', ['class' => 'glyphicon glyphicon-eye-open']), ['error/view', 'id' => $model->id] |
| 25 | 25 | ); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | 'type', |
| 15 | 15 | [ |
| 16 | 16 | 'header' => Yii::t('audit', 'Data'), |
| 17 | - 'value' => function ($data) { |
|
| 17 | + 'value' => function($data) { |
|
| 18 | 18 | return \yii\helpers\VarDumper::dumpAsString($data['data']); |
| 19 | 19 | } |
| 20 | 20 | ] |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | ], |
| 38 | 38 | [ |
| 39 | 39 | 'header' => Yii::t('audit', 'Data'), |
| 40 | - 'value' => function ($data) { |
|
| 40 | + 'value' => function($data) { |
|
| 41 | 41 | $out = '<a class="data-toggle glyphicon glyphicon-plus" href="javascript:void(0);"></a>'; |
| 42 | 42 | $out .= '<pre style="display:none;">'; |
| 43 | 43 | $out .= \yii\helpers\VarDumper::dumpAsString($data['data']); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | 'class' => 'yii\grid\ActionColumn', |
| 20 | 20 | 'template' => '{view}', |
| 21 | 21 | 'buttons' => [ |
| 22 | - 'view' => function ($url, $model) { |
|
| 22 | + 'view' => function($url, $model) { |
|
| 23 | 23 | return Html::a( |
| 24 | 24 | Html::tag('span', '', ['class' => 'glyphicon glyphicon-eye-open']), ['mail/view', 'id' => $model->id] |
| 25 | 25 | ); |