@@ -64,14 +64,14 @@ |
||
64 | 64 | */ |
65 | 65 | public function getDiffHtml() |
66 | 66 | { |
67 | - $old = explode("\n", (string)$this->old_value); |
|
68 | - $new = explode("\n", (string)$this->new_value); |
|
67 | + $old = explode("\n", (string) $this->old_value); |
|
68 | + $new = explode("\n", (string) $this->new_value); |
|
69 | 69 | |
70 | 70 | foreach ($old as $i => $line) { |
71 | - $old[$i] = rtrim((string)$line, "\r\n"); |
|
71 | + $old[$i] = rtrim((string) $line, "\r\n"); |
|
72 | 72 | } |
73 | 73 | foreach ($new as $i => $line) { |
74 | - $new[$i] = rtrim((string)$line, "\r\n"); |
|
74 | + $new[$i] = rtrim((string) $line, "\r\n"); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $diff = new \Diff($old, $new); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | // Fake an actionEvent so we can use the track/ignore functionality using the originally requested route: |
38 | - $event = (object) ['action' => (object)['uniqueId' => Yii::$app->requestedRoute]]; |
|
38 | + $event = (object) ['action' => (object) ['uniqueId' => Yii::$app->requestedRoute]]; |
|
39 | 39 | if ($audit->shouldTrack($event, true)) { |
40 | 40 | $entry = $audit->getEntry(!$isMemoryError); |
41 | 41 | if ($entry) { |
@@ -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', |