@@ -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,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\Db; |
| 8 | 8 | use yii\grid\GridViewAsset; |
| 9 | 9 | |
@@ -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 | /** |
@@ -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\Log; |
| 8 | 8 | use yii\grid\GridViewAsset; |
| 9 | 9 | |
@@ -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 | /** |
@@ -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 = isset($this->data['memory']) ? sprintf('%.1f MB', $this->data['memory'] / 1048576) : ''; |
| 24 | - $time = isset($this->data['time']) ? number_format($this->data['time'] * 1000) . ' ms' : ''; |
|
| 25 | - return $this->getName() . ' <small>(' . $memory . ' / ' . $time . ')</small>'; |
|
| 24 | + $time = isset($this->data['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' => isset($this->data['memory']) ? sprintf('%.1f MB', $this->data['memory'] / 1048576) : '', |
| 41 | - 'time' => isset($this->data['time']) ? number_format($this->data['time'] * 1000) . ' ms' : '', |
|
| 41 | + 'time' => isset($this->data['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 | |
@@ -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 | /** |
@@ -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)]); |
@@ -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 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | $data = ArrayHelper::toArray($data); |
| 93 | 93 | if ($simplify) |
| 94 | - array_walk($data, function (&$value) { |
|
| 94 | + array_walk($data, function(&$value) { |
|
| 95 | 95 | if (is_array($value) && count($value) == 1) $value = reset($value); |
| 96 | 96 | }); |
| 97 | 97 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | if (is_object($value)) { |
| 168 | 168 | $class = get_class($value); |
| 169 | 169 | // By default we just mention the object type |
| 170 | - $args[$name] = 'Object(' . $class . ')'; |
|
| 170 | + $args[$name] = 'Object('.$class.')'; |
|
| 171 | 171 | |
| 172 | 172 | if ($recurseDepth > 0) { |
| 173 | 173 | // Make sure to limit the toArray to non recursive, it's much to easy to get stuck in an infinite loop |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | $hash = bcadd(sprintf('%u', crc32($data)), 0x100000000); |
| 199 | 199 | $str = ''; |
| 200 | 200 | do { |
| 201 | - $str = $map[bcmod($hash, 62)] . $str; |
|
| 201 | + $str = $map[bcmod($hash, 62)].$str; |
|
| 202 | 202 | $hash = bcdiv($hash, 62); |
| 203 | 203 | } while ($hash >= 1); |
| 204 | 204 | return $str; |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | return $this->_data['result'] = parent::__doRequest($request, $location, $action, $version, $one_way); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - public function __setCookie ($name, $value = null) |
|
| 83 | + public function __setCookie($name, $value = null) |
|
| 84 | 84 | { |
| 85 | 85 | if (!isset($this->_data['cookies'])) |
| 86 | 86 | $this->_data['cookies'] = []; |