@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $this->title = Yii::t('audit', 'Entry #{id}', ['id' => $model->id]); |
22 | 22 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Audit'), 'url' => ['default/index']]; |
23 | 23 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Entries'), 'url' => ['index']]; |
24 | -$this->params['breadcrumbs'][] = '#' . $model->id; |
|
24 | +$this->params['breadcrumbs'][] = '#'.$model->id; |
|
25 | 25 | |
26 | 26 | ?> |
27 | 27 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | <div class="list-group"> |
88 | 88 | <?php |
89 | 89 | foreach ($panels as $id => $panel) { |
90 | - $label = '<i class="glyphicon glyphicon-chevron-right"></i>' . $panel->getLabel(); |
|
90 | + $label = '<i class="glyphicon glyphicon-chevron-right"></i>'.$panel->getLabel(); |
|
91 | 91 | echo Html::a($label, ['view', 'id' => $model->id, 'panel' => $id], [ |
92 | 92 | 'class' => $panel === $activePanel ? 'list-group-item active' : 'list-group-item', |
93 | 93 | ]); |
@@ -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->getTrails()->count(); |
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->getMails()->count(); |
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->getJavascripts()->count(); |
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->getLinkedErrors()->count(); |
94 | 94 | }, |
95 | 95 | 'contentOptions' => ['class' => 'text-right'], |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | 'class' => 'yii\grid\ActionColumn', |
21 | 21 | 'template' => '{view}', |
22 | 22 | 'buttons' => [ |
23 | - 'view' => function ($url, $model) { |
|
23 | + 'view' => function($url, $model) { |
|
24 | 24 | return Html::a( |
25 | 25 | Html::tag('span', '', ['class' => 'glyphicon glyphicon-eye-open']), ['trail/view', 'id' => $model->id] |
26 | 26 | ); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | 'attribute' => 'user_id', |
41 | 41 | 'label' => Yii::t('audit', 'User ID'), |
42 | 42 | 'class' => 'yii\grid\DataColumn', |
43 | - 'value' => function ($data) { |
|
43 | + 'value' => function($data) { |
|
44 | 44 | return Audit::getInstance()->getUserIdentifier($data->user_id); |
45 | 45 | }, |
46 | 46 | 'options' => [ |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | ], |
76 | 76 | [ |
77 | 77 | 'label' => Yii::t('audit', 'Diff'), |
78 | - 'value' => function (AuditTrailSearch $model) { |
|
78 | + 'value' => function(AuditTrailSearch $model) { |
|
79 | 79 | return $model->getDiffHtml(); |
80 | 80 | }, |
81 | 81 | 'format' => 'raw', |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $this->title = Yii::t('audit', 'Trail #{id}', ['id' => $model->id]); |
11 | 11 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Audit'), 'url' => ['default/index']]; |
12 | 12 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Trails'), 'url' => ['trail/index']]; |
13 | -$this->params['breadcrumbs'][] = '#' . $model->id; |
|
13 | +$this->params['breadcrumbs'][] = '#'.$model->id; |
|
14 | 14 | |
15 | 15 | echo Html::tag('h1', $this->title); |
16 | 16 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | 'created', |
36 | 36 | [ |
37 | 37 | 'label' => Yii::t('audit', 'Difference'), |
38 | - 'value' => function ($model) { |
|
38 | + 'value' => function($model) { |
|
39 | 39 | return $model->getDiffHtml(); |
40 | 40 | }, |
41 | 41 | 'format' => 'raw', |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
75 | - return (string)$value; |
|
75 | + return (string) $value; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -81,21 +81,21 @@ discard block |
||
81 | 81 | public function getDiffHtml() |
82 | 82 | { |
83 | 83 | if (Audit::getInstance()->enablePrettyDiffForTrails) { |
84 | - $oldValue = self::prettyPrintIfValueIsJson((string)$this->old_value); |
|
85 | - $newValue = self::prettyPrintIfValueIsJson((string)$this->new_value); |
|
84 | + $oldValue = self::prettyPrintIfValueIsJson((string) $this->old_value); |
|
85 | + $newValue = self::prettyPrintIfValueIsJson((string) $this->new_value); |
|
86 | 86 | } else { |
87 | - $oldValue = (string)$this->old_value; |
|
88 | - $newValue = (string)$this->new_value; |
|
87 | + $oldValue = (string) $this->old_value; |
|
88 | + $newValue = (string) $this->new_value; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $old = explode("\n", $oldValue); |
92 | 92 | $new = explode("\n", $newValue); |
93 | 93 | |
94 | 94 | foreach ($old as $i => $line) { |
95 | - $old[$i] = rtrim((string)$line, "\r\n"); |
|
95 | + $old[$i] = rtrim((string) $line, "\r\n"); |
|
96 | 96 | } |
97 | 97 | foreach ($new as $i => $line) { |
98 | - $new[$i] = rtrim((string)$line, "\r\n"); |
|
98 | + $new[$i] = rtrim((string) $line, "\r\n"); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $diff = new \Diff($old, $new); |