@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function typeFilter() |
70 | 70 | { |
71 | - $types = AuditJavascript::getDb()->cache(function () { |
|
71 | + $types = AuditJavascript::getDb()->cache(function() { |
|
72 | 72 | return AuditJavascript::find()->distinct(true) |
73 | 73 | ->select('type') |
74 | 74 | ->where(['entry_id' => $this->entry_id]) |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function originFilter() |
85 | 85 | { |
86 | - $origin = AuditJavascript::getDb()->cache(function () { |
|
86 | + $origin = AuditJavascript::getDb()->cache(function() { |
|
87 | 87 | return AuditJavascript::find()->distinct(true) |
88 | 88 | ->select('origin') |
89 | 89 | ->where(['entry_id' => $this->entry_id]) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function getLabel() |
63 | 63 | { |
64 | - return $this->getName() . ' <small>(' . count($this->data) . ')</small>'; |
|
64 | + return $this->getName().' <small>('.count($this->data).')</small>'; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | if ($this->content) |
140 | - $this->data[$id]['content']= curl_multi_getcontent($handle); |
|
140 | + $this->data[$id]['content'] = curl_multi_getcontent($handle); |
|
141 | 141 | |
142 | 142 | // Cleanup empty things |
143 | 143 | $this->data[$id] = array_filter($this->data[$id]); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | if (!is_resource($resource)) |
209 | 209 | return false; |
210 | 210 | |
211 | - $parts = explode('#', (string)$resource); |
|
211 | + $parts = explode('#', (string) $resource); |
|
212 | 212 | return array_pop($parts); |
213 | 213 | } |
214 | 214 |
@@ -29,8 +29,8 @@ |
||
29 | 29 | { |
30 | 30 | $timings = $this->calculateTimings(); |
31 | 31 | $queryCount = count($timings); |
32 | - $queryTime = number_format($this->getTotalQueryTime($timings) * 1000) . ' ms'; |
|
33 | - return $this->getName() . ' <small>(' . $queryCount . ' / ' . $queryTime . ')</small>'; |
|
32 | + $queryTime = number_format($this->getTotalQueryTime($timings) * 1000).' ms'; |
|
33 | + return $this->getName().' <small>('.$queryCount.' / '.$queryTime.')</small>'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | public function getLabel() |
38 | 38 | { |
39 | - return $this->getName() . ' <small>(' . count($this->data) . ')</small>'; |
|
39 | + return $this->getName().' <small>('.count($this->data).')</small>'; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -21,7 +21,7 @@ |
||
21 | 21 | public function getLabel() |
22 | 22 | { |
23 | 23 | $messageCount = isset($this->data['messages']) ? count($this->data['messages']) : 0; |
24 | - return $this->getName() . ($messageCount ? ' <small>(' . $messageCount . ')</small>' : ''); |
|
24 | + return $this->getName().($messageCount ? ' <small>('.$messageCount.')</small>' : ''); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -63,9 +63,9 @@ |
||
63 | 63 | { |
64 | 64 | if (Yii::$app->requestedAction) { |
65 | 65 | if (Yii::$app->requestedAction instanceof InlineAction) { |
66 | - return get_class(Yii::$app->requestedAction->controller) . '::' . Yii::$app->requestedAction->actionMethod . '()'; |
|
66 | + return get_class(Yii::$app->requestedAction->controller).'::'.Yii::$app->requestedAction->actionMethod.'()'; |
|
67 | 67 | } |
68 | - return get_class(Yii::$app->requestedAction) . '::run()'; |
|
68 | + return get_class(Yii::$app->requestedAction).'::run()'; |
|
69 | 69 | } |
70 | 70 | return null; |
71 | 71 | } |
@@ -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 |
@@ -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) |