@@ -31,7 +31,7 @@ |
||
31 | 31 | [ |
32 | 32 | 'attribute' => 'entry_id', |
33 | 33 | 'class' => 'yii\grid\DataColumn', |
34 | - 'value' => function ($data) { |
|
34 | + 'value' => function($data) { |
|
35 | 35 | return $data->entry_id ? Html::a($data->entry_id, ['entry/view', 'id' => $data->entry_id]) : ''; |
36 | 36 | }, |
37 | 37 | 'format' => 'raw', |
@@ -6,5 +6,6 @@ |
||
6 | 6 | |
7 | 7 | echo Html::tag('h1', $panel->name); |
8 | 8 | |
9 | -foreach ($dataProvider->allModels as $index => $request) |
|
9 | +foreach ($dataProvider->allModels as $index => $request) { |
|
10 | 10 | echo $this->render('detail', ['panel' => $panel, 'request' => $request, 'index' => $index + 1]); |
11 | +} |
@@ -31,7 +31,7 @@ |
||
31 | 31 | [ |
32 | 32 | 'attribute' => 'entry_id', |
33 | 33 | 'class' => 'yii\grid\DataColumn', |
34 | - 'value' => function ($data) { |
|
34 | + 'value' => function($data) { |
|
35 | 35 | return $data->entry_id ? Html::a($data->entry_id, ['entry/view', 'id' => $data->entry_id]) : ''; |
36 | 36 | }, |
37 | 37 | 'format' => 'raw', |
@@ -9,7 +9,7 @@ |
||
9 | 9 | $defaults = []; |
10 | 10 | $startDate = strtotime('-6 days'); |
11 | 11 | foreach (range(-6, 0) as $day) { |
12 | - $defaults[date('D: Y-m-d', strtotime($day . 'days'))] = 0; |
|
12 | + $defaults[date('D: Y-m-d', strtotime($day.'days'))] = 0; |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | $results = AuditTrail::find() |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $defaults = []; |
38 | 38 | $startDate = strtotime('-6 days'); |
39 | 39 | foreach (range(-6, 0) as $day) { |
40 | - $defaults[date('D: Y-m-d', strtotime($day . 'days'))] = 0; |
|
40 | + $defaults[date('D: Y-m-d', strtotime($day.'days'))] = 0; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $panelModel = $this->getChartModel(); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $this->title = Yii::t('audit', 'Error #{id}', ['id' => $model->id]); |
12 | 12 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Audit'), 'url' => ['default/index']]; |
13 | 13 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Errors'), 'url' => ['index']]; |
14 | -$this->params['breadcrumbs'][] = '#' . $model->id; |
|
14 | +$this->params['breadcrumbs'][] = '#'.$model->id; |
|
15 | 15 | |
16 | 16 | echo Html::tag('h1', $this->title); |
17 | 17 | |
@@ -44,16 +44,15 @@ discard block |
||
44 | 44 | 'line', |
45 | 45 | [ |
46 | 46 | 'header' => Yii::t('audit', 'Called'), |
47 | - 'value' => function ($data) { |
|
47 | + 'value' => function($data) { |
|
48 | 48 | return |
49 | 49 | isset($data['type']) ? |
50 | - (( isset($data['class']) ? $data['class'] : '[unknown]') . $data['type'] . $data['function']) : |
|
51 | - $data['function']; |
|
50 | + ((isset($data['class']) ? $data['class'] : '[unknown]').$data['type'].$data['function']) : $data['function']; |
|
52 | 51 | } |
53 | 52 | ], |
54 | 53 | [ |
55 | 54 | 'header' => Yii::t('audit', 'Args'), |
56 | - 'value' => function ($data) { |
|
55 | + 'value' => function($data) { |
|
57 | 56 | $out = '<a class="args-toggle glyphicon glyphicon-plus" href="javascript:void(0);"></a>'; |
58 | 57 | $out .= '<pre style="display:none;">'; |
59 | 58 | $out .= !empty($data['args']) ? VarDumper::dumpAsString($data['args']) : ''; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | <?php foreach ($values as $name => $value): ?> |
28 | 28 | <tr> |
29 | 29 | <th><?= Html::encode($name) ?></th> |
30 | - <td><?= htmlspecialchars(VarDumper::dumpAsString($value), ENT_QUOTES | ENT_SUBSTITUTE, |
|
30 | + <td><?= htmlspecialchars(VarDumper::dumpAsString($value), ENT_QUOTES|ENT_SUBSTITUTE, |
|
31 | 31 | \Yii::$app->charset, true) ?></td> |
32 | 32 | </tr> |
33 | 33 | <?php endforeach; ?> |
@@ -12,7 +12,8 @@ discard block |
||
12 | 12 | |
13 | 13 | <p>Empty.</p> |
14 | 14 | |
15 | -<?php else: ?> |
|
15 | +<?php else { |
|
16 | + : ?> |
|
16 | 17 | |
17 | 18 | <div class="table-responsive"> |
18 | 19 | <table class="table table-condensed table-bordered table-striped table-hover request-table" |
@@ -30,7 +31,9 @@ discard block |
||
30 | 31 | <td><?= htmlspecialchars(VarDumper::dumpAsString($value), ENT_QUOTES | ENT_SUBSTITUTE, |
31 | 32 | \Yii::$app->charset, true) ?></td> |
32 | 33 | </tr> |
33 | - <?php endforeach; ?> |
|
34 | + <?php endforeach; |
|
35 | +} |
|
36 | +?> |
|
34 | 37 | </tbody> |
35 | 38 | </table> |
36 | 39 | </div> |
@@ -4,8 +4,8 @@ |
||
4 | 4 | |
5 | 5 | use bedezign\yii2\audit\Audit; |
6 | 6 | use bedezign\yii2\audit\components\panels\Panel; |
7 | -use bedezign\yii2\audit\web\JSLoggingAsset; |
|
8 | 7 | use bedezign\yii2\audit\components\web\Helper as WebHelper; |
8 | +use bedezign\yii2\audit\web\JSLoggingAsset; |
|
9 | 9 | use yii\debug\DebugAsset; |
10 | 10 | use yii\helpers\Html; |
11 | 11 | use yii\widgets\Breadcrumbs; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $this->title = Yii::t('audit', 'Mail #{id}', ['id' => $model->id]); |
12 | 12 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Audit'), 'url' => ['default/index']]; |
13 | 13 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Mails'), 'url' => ['index']]; |
14 | -$this->params['breadcrumbs'][] = '#' . $model->id; |
|
14 | +$this->params['breadcrumbs'][] = '#'.$model->id; |
|
15 | 15 | |
16 | 16 | if (Audit::getInstance()->hasMethod('renderEmail')) { |
17 | 17 | Audit::getInstance()->renderEmail($this, $model); |
@@ -21,5 +21,5 @@ discard block |
||
21 | 21 | $parser->setText($model->data); |
22 | 22 | echo $parser->getMessageBody('htmlEmbedded'); |
23 | 23 | } else { |
24 | - echo Html::tag('pre', $model->data) . Html::tag('br') . 'Please register a renderEmail panel function or install php-mime-mail-parser for better functionality'; |
|
24 | + echo Html::tag('pre', $model->data).Html::tag('br').'Please register a renderEmail panel function or install php-mime-mail-parser for better functionality'; |
|
25 | 25 | } |
@@ -15,8 +15,7 @@ |
||
15 | 15 | |
16 | 16 | if (Audit::getInstance()->hasMethod('renderEmail')) { |
17 | 17 | Audit::getInstance()->renderEmail($this, $model); |
18 | -} |
|
19 | -elseif (class_exists('\PhpMimeMailParser\Parser')) { |
|
18 | +} elseif (class_exists('\PhpMimeMailParser\Parser')) { |
|
20 | 19 | $parser = new \PhpMimeMailParser\Parser(); |
21 | 20 | $parser->setText($model->data); |
22 | 21 | echo $parser->getMessageBody('htmlEmbedded'); |