diff --git a/extensions/yii/debug/controllers/DefaultController.php b/extensions/yii/debug/controllers/DefaultController.php index 6109a39..1542f67 100644 --- a/extensions/yii/debug/controllers/DefaultController.php +++ b/extensions/yii/debug/controllers/DefaultController.php @@ -20,7 +20,7 @@ class DefaultController extends Controller { public $layout = 'main'; /** - * @var \yii\debug\Module + * @var \yii\debug\Module */ public $module; /** @@ -88,7 +88,7 @@ class DefaultController extends Controller protected function getManifest($forceReload = false) { if ($this->_manifest === null || $forceReload) { - if ($forceReload) { + if ($forceReload) { clearstatcache(); } $indexFile = $this->module->dataPath . '/index.data'; diff --git a/extensions/yii/debug/panels/DbPanel.php b/extensions/yii/debug/panels/DbPanel.php index 2366ff8..271373b 100644 --- a/extensions/yii/debug/panels/DbPanel.php +++ b/extensions/yii/debug/panels/DbPanel.php @@ -42,7 +42,7 @@ class DbPanel extends Panel $queryCount = count($timings); $queryTime = number_format($this->getTotalQueryTime($timings) * 1000) . ' ms'; - return Yii::$app->view->render('panels/db/summary',[ + return Yii::$app->view->render('panels/db/summary', [ 'timings' => $this->calculateTimings(), 'panel' => $this, 'queryCount' => $queryCount, @@ -55,7 +55,7 @@ class DbPanel extends Panel $searchModel = new Db(); $dataProvider = $searchModel->search(Yii::$app->request->get(), $this->getModels()); - return Yii::$app->view->render('panels/db/detail', [ + return Yii::$app->view->render('panels/db/detail', [ 'panel' => $this, 'dataProvider' => $dataProvider, 'searchModel' => $searchModel, @@ -112,9 +112,9 @@ class DbPanel extends Panel $this->_models[] = [ 'type' => $this->detectQueryType($dbTiming['info']), 'query' => $dbTiming['info'], - 'duration' => ($dbTiming['duration'] * 1000), #in milliseconds + 'duration' => ($dbTiming['duration'] * 1000), // in milliseconds 'trace' => $dbTiming['trace'], - 'timestamp' => $dbTiming['timestamp'], + 'timestamp' => ($dbTiming['timestamp'] * 1000), // in milliseconds 'seq' => $seq, ]; } diff --git a/extensions/yii/debug/panels/LogPanel.php b/extensions/yii/debug/panels/LogPanel.php index 160bca8..d96704e 100644 --- a/extensions/yii/debug/panels/LogPanel.php +++ b/extensions/yii/debug/panels/LogPanel.php @@ -33,7 +33,7 @@ class LogPanel extends Panel public function getSummary() { - return Yii::$app->view->render('panels/log/summary', ['data' => $this->data, 'panel' => $this]); + return Yii::$app->view->render('panels/log/summary', ['data' => $this->data, 'panel' => $this]); } public function getDetail() @@ -41,7 +41,7 @@ class LogPanel extends Panel $searchModel = new Log(); $dataProvider = $searchModel->search(Yii::$app->request->get(), $this->getModels()); - return Yii::$app->view->render('panels/log/detail',[ + return Yii::$app->view->render('panels/log/detail', [ 'dataProvider' => $dataProvider, 'panel' => $this, 'searchModel' => $searchModel, @@ -61,7 +61,7 @@ class LogPanel extends Panel * @param boolean $refresh if needed to build models from log messages and refresh them. * @return array models */ - protected function getModels($refresh=false) + protected function getModels($refresh = false) { if ($this->_models === null || $refresh) { $this->_models = []; @@ -71,7 +71,7 @@ class LogPanel extends Panel 'message' => $message[0], 'level' => $message[1], 'category' => $message[2], - 'time' => ($message[3] * 1000), #time in milliseconds + 'time' => ($message[3] * 1000), // time in milliseconds 'trace' => $message[4] ]; } diff --git a/extensions/yii/debug/panels/ProfilingPanel.php b/extensions/yii/debug/panels/ProfilingPanel.php index 855ffd1..9558bd3 100644 --- a/extensions/yii/debug/panels/ProfilingPanel.php +++ b/extensions/yii/debug/panels/ProfilingPanel.php @@ -32,7 +32,7 @@ class ProfilingPanel extends Panel public function getSummary() { - return Yii::$app->view->render('panels/profile/summary', [ + return Yii::$app->view->render('panels/profile/summary', [ 'memory' => sprintf('%.1f MB', $this->data['memory'] / 1048576), 'time' => number_format($this->data['time'] * 1000) . ' ms', 'panel' => $this @@ -44,7 +44,7 @@ class ProfilingPanel extends Panel $searchModel = new Profile(); $dataProvider = $searchModel->search(Yii::$app->request->get(), $this->getModels()); - return Yii::$app->view->render('panels/profile/detail', [ + return Yii::$app->view->render('panels/profile/detail', [ 'panel' => $this, 'dataProvider' => $dataProvider, 'searchModel' => $searchModel, diff --git a/extensions/yii/debug/views/default/panels/request/detail.php b/extensions/yii/debug/views/default/panels/request/detail.php index 3098f65..cca0af2 100644 --- a/extensions/yii/debug/views/default/panels/request/detail.php +++ b/extensions/yii/debug/views/default/panels/request/detail.php @@ -9,22 +9,22 @@ echo Tabs::widget([ 'items' => [ [ 'label' => 'Parameters', - 'content' => $this->render('panels/request/table', ['caption' => 'Routing', 'values' => ['Route' => $panel->data['route'], 'Action' => $panel->data['action'], 'Parameters' => $panel->data['actionParams']]]) - . $this->render('panels/request/table', ['caption' => '$_GET', 'values' => $panel->data['GET']]) - . $this->render('panels/request/table', ['caption' => '$_POST', 'values' => $panel->data['POST']]) - . $this->render('panels/request/table', ['caption' => '$_FILES', 'values' => $panel->data['FILES']]) - . $this->render('panels/request/table', ['caption' => '$_COOKIE', 'values' => $panel->data['COOKIE']]), + 'content' => $this->render('panels/request/table', ['caption' => 'Routing', 'values' => ['Route' => $panel->data['route'], 'Action' => $panel->data['action'], 'Parameters' => $panel->data['actionParams']]]) + . $this->render('panels/request/table', ['caption' => '$_GET', 'values' => $panel->data['GET']]) + . $this->render('panels/request/table', ['caption' => '$_POST', 'values' => $panel->data['POST']]) + . $this->render('panels/request/table', ['caption' => '$_FILES', 'values' => $panel->data['FILES']]) + . $this->render('panels/request/table', ['caption' => '$_COOKIE', 'values' => $panel->data['COOKIE']]), 'active' => true, ], [ 'label' => 'Headers', - 'content' => $this->render('panels/request/table', ['caption' => 'Request Headers', 'values' => $panel->data['requestHeaders']]) - . $this->render('panels/request/table', ['caption' => 'Response Headers', 'values' => $panel->data['responseHeaders']]) + 'content' => $this->render('panels/request/table', ['caption' => 'Request Headers', 'values' => $panel->data['requestHeaders']]) + . $this->render('panels/request/table', ['caption' => 'Response Headers', 'values' => $panel->data['responseHeaders']]) ], [ 'label' => 'Session', - 'content' => $this->render('panels/request/table', ['caption' => '$_SESSION', 'values' => $panel->data['SESSION']]) - . $this->render('panels/request/table', ['caption' => 'Flashes', 'values' => $panel->data['flashes']]) + 'content' => $this->render('panels/request/table', ['caption' => '$_SESSION', 'values' => $panel->data['SESSION']]) + . $this->render('panels/request/table', ['caption' => 'Flashes', 'values' => $panel->data['flashes']]) ], [ 'label' => '$_SERVER', diff --git a/extensions/yii/debug/views/default/view.php b/extensions/yii/debug/views/default/view.php index 77eaee4..c00f601 100644 --- a/extensions/yii/debug/views/default/view.php +++ b/extensions/yii/debug/views/default/view.php @@ -18,7 +18,7 @@ $this->title = 'Yii Debugger';