@@ -8,8 +8,8 @@ |
||
8 | 8 | |
9 | 9 | use Yii; |
10 | 10 | use bedezign\yii2\audit\components\panels\DataStoragePanel; |
11 | -use yii\grid\GridViewAsset; |
|
12 | 11 | use yii\data\ArrayDataProvider; |
12 | +use yii\grid\GridViewAsset; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Class CurlPanel |
@@ -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 |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | namespace bedezign\yii2\audit\panels; |
4 | 4 | |
5 | +use Exception; |
|
6 | +use Yii; |
|
5 | 7 | use bedezign\yii2\audit\components\Helper; |
6 | 8 | use bedezign\yii2\audit\components\panels\Panel; |
7 | 9 | use bedezign\yii2\audit\models\AuditError; |
8 | 10 | use bedezign\yii2\audit\models\AuditErrorSearch; |
9 | -use Exception; |
|
10 | -use Yii; |
|
11 | 11 | use yii\grid\GridViewAsset; |
12 | 12 | |
13 | 13 | /** |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | return $entry ? $this->log($entry->id, $e) : null; |
30 | 30 | }); |
31 | 31 | |
32 | - $this->module->registerFunction('errorMessage', function ($message, $code = 0, $file = '', $line = 0, $trace = []) { |
|
32 | + $this->module->registerFunction('errorMessage', function($message, $code = 0, $file = '', $line = 0, $trace = []) { |
|
33 | 33 | $entry = $this->module->getEntry(true); |
34 | 34 | return $entry ? $this->logMessage($entry->id, $message, $code, $file, $line, $trace) : null; |
35 | 35 | }); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $error->file = $exception->getFile(); |
62 | 62 | $error->line = $exception->getLine(); |
63 | 63 | $error->trace = Helper::cleanupTrace($exception->getTrace()); |
64 | - $error->hash = Helper::hash($error->message . $error->file . $error->line); |
|
64 | + $error->hash = Helper::hash($error->message.$error->file.$error->line); |
|
65 | 65 | |
66 | 66 | $this->_exceptions[] = $exceptionId; |
67 | 67 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $error->file = $file; |
89 | 89 | $error->line = $line; |
90 | 90 | $error->trace = Helper::cleanupTrace($trace); |
91 | - $error->hash = Helper::hash($error->message . $error->file . $error->line); |
|
91 | + $error->hash = Helper::hash($error->message.$error->file.$error->line); |
|
92 | 92 | return $error->save(false) ? $error : null; |
93 | 93 | } |
94 | 94 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function getLabel() |
115 | 115 | { |
116 | - return $this->getName() . ' <small>(' . count($this->_model->linkedErrors) . ')</small>'; |
|
116 | + return $this->getName().' <small>('.count($this->_model->linkedErrors).')</small>'; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -2,14 +2,14 @@ |
||
2 | 2 | |
3 | 3 | namespace bedezign\yii2\audit\panels; |
4 | 4 | |
5 | -use bedezign\yii2\audit\Audit; |
|
6 | -use bedezign\yii2\audit\components\panels\Panel; |
|
7 | -use bedezign\yii2\audit\models\AuditMail; |
|
8 | -use bedezign\yii2\audit\models\AuditMailSearch; |
|
9 | 5 | use Swift_Message; |
10 | 6 | use Swift_Mime_Attachment; |
11 | 7 | use Swift_Mime_MimePart; |
12 | 8 | use Yii; |
9 | +use bedezign\yii2\audit\Audit; |
|
10 | +use bedezign\yii2\audit\components\panels\Panel; |
|
11 | +use bedezign\yii2\audit\models\AuditMail; |
|
12 | +use bedezign\yii2\audit\models\AuditMailSearch; |
|
13 | 13 | use yii\base\Event; |
14 | 14 | use yii\grid\GridViewAsset; |
15 | 15 | use yii\mail\BaseMailer; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function init() |
30 | 30 | { |
31 | 31 | parent::init(); |
32 | - Event::on(BaseMailer::className(), BaseMailer::EVENT_AFTER_SEND, function ($event) { |
|
32 | + Event::on(BaseMailer::className(), BaseMailer::EVENT_AFTER_SEND, function($event) { |
|
33 | 33 | $this->record($event); |
34 | 34 | }); |
35 | 35 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function getLabel() |
117 | 117 | { |
118 | - return $this->getName() . ' <small>(' . count($this->_model->mails) . ')</small>'; |
|
118 | + return $this->getName().' <small>('.count($this->_model->mails).')</small>'; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace bedezign\yii2\audit\panels; |
4 | 4 | |
5 | -use bedezign\yii2\audit\components\panels\DataStoragePanelTrait; |
|
6 | 5 | use Yii; |
6 | +use bedezign\yii2\audit\components\panels\DataStoragePanelTrait; |
|
7 | 7 | use yii\debug\models\search\Profile; |
8 | 8 | use yii\grid\GridViewAsset; |
9 | 9 |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | public function getLabel() |
22 | 22 | { |
23 | 23 | $memory = sprintf('%.1f MB', $this->data['memory'] / 1048576); |
24 | - $time = number_format($this->data['time'] * 1000) . ' ms'; |
|
25 | - return $this->getName() . ' <small>(' . $memory . ' / ' . $time . ')</small>'; |
|
24 | + $time = number_format($this->data['time'] * 1000).' ms'; |
|
25 | + return $this->getName().' <small>('.$memory.' / '.$time.')</small>'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | 'dataProvider' => $dataProvider, |
39 | 39 | 'searchModel' => $searchModel, |
40 | 40 | 'memory' => sprintf('%.1f MB', $this->data['memory'] / 1048576), |
41 | - 'time' => number_format($this->data['time'] * 1000) . ' ms', |
|
41 | + 'time' => number_format($this->data['time'] * 1000).' ms', |
|
42 | 42 | ]); |
43 | 43 | } |
44 | 44 |
@@ -2,7 +2,6 @@ |
||
2 | 2 | namespace bedezign\yii2\audit\panels; |
3 | 3 | |
4 | 4 | use Yii; |
5 | -use bedezign\yii2\audit\models\AuditError; |
|
6 | 5 | use bedezign\yii2\audit\components\panels\DataStoragePanel; |
7 | 6 | use yii\data\ArrayDataProvider; |
8 | 7 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function getLabel() |
24 | 24 | { |
25 | - return $this->getName() . ' <small>(' . count($this->data) . ')</small>'; |
|
25 | + return $this->getName().' <small>('.count($this->data).')</small>'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace bedezign\yii2\audit\panels; |
4 | 4 | |
5 | +use Yii; |
|
5 | 6 | use bedezign\yii2\audit\components\panels\Panel; |
6 | 7 | use bedezign\yii2\audit\models\AuditTrail; |
7 | 8 | use bedezign\yii2\audit\models\AuditTrailSearch; |
8 | -use Yii; |
|
9 | 9 | use yii\grid\GridViewAsset; |
10 | 10 | |
11 | 11 | /** |
@@ -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 | /** |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /* @var $panel bedezign\yii2\audit\panels\SoapPanel */ |
3 | 3 | |
4 | -use yii\bootstrap\Tabs; |
|
5 | -use yii\helpers\Html; |
|
6 | 4 | use bedezign\yii2\audit\components\Helper; |
5 | +use yii\bootstrap\Tabs; |
|
7 | 6 | use yii\helpers\ArrayHelper; |
7 | +use yii\helpers\Html; |
|
8 | 8 | use yii\helpers\VarDumper; |
9 | 9 | |
10 | 10 | $preformatted = ['class' => 'well', 'style' => 'overflow: auto; white-space: pre']; |
@@ -38,6 +38,6 @@ |
||
38 | 38 | unset($request['result']); |
39 | 39 | } |
40 | 40 | |
41 | -$tabs[] = [ 'label' => \Yii::t('audit', 'Info'), 'content' => $this->render('info_table', ['request' => $request]), 'active' => true ]; |
|
41 | +$tabs[] = ['label' => \Yii::t('audit', 'Info'), 'content' => $this->render('info_table', ['request' => $request]), 'active' => true]; |
|
42 | 42 | |
43 | 43 | echo Html::tag('h2', \Yii::t('audit', 'Request #{id}', ['id' => $index])), Tabs::widget(['items' => array_reverse($tabs)]); |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use yii\helpers\Html; |
4 | 4 | use yii\helpers\VarDumper; |
5 | -use yii\helpers\Url; |
|
6 | 5 | |
7 | 6 | |
8 | 7 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | if (isset($request['error']) && isset($request['error'][1])) { |
12 | 12 | $error = \bedezign\yii2\audit\models\AuditError::findOne($request['error'][1]); |
13 | - $request['error'] = Html::a('[' . $request['error'][0] . '] ' . $error->message, ['error/view', 'id' => $error->id]); |
|
13 | + $request['error'] = Html::a('['.$request['error'][0].'] '.$error->message, ['error/view', 'id' => $error->id]); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | ?> |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | if (is_array($value) || is_object($value)) |
32 | 32 | $value = \yii\helpers\ArrayHelper::toArray($value); |
33 | 33 | elseif ($name == 'duration') |
34 | - $value = number_format($value, 2) . 's'; |
|
34 | + $value = number_format($value, 2).'s'; |
|
35 | 35 | echo $name == 'error' ? $value : $formatter->asText(is_scalar($value) ? $value : VarDumper::dumpAsString($value)); |
36 | 36 | ?> |
37 | 37 | </td> |
@@ -135,9 +135,9 @@ |
||
135 | 135 | // 'audit/config', |
136 | 136 | |
137 | 137 | // These provide special functionality and get loaded to activate it |
138 | - 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
139 | - 'audit/extra', // Links the data functions (`data()`) |
|
140 | - 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
138 | + 'audit/error', // Links the extra error reporting functions (`exception()` and `errorMessage()`) |
|
139 | + 'audit/extra', // Links the data functions (`data()`) |
|
140 | + 'audit/curl', // Links the curl tracking function (`curlBegin()`, `curlEnd()` and `curlExec()`) |
|
141 | 141 | ]; |
142 | 142 | |
143 | 143 | /** |