@@ -130,6 +130,9 @@ |
||
| 130 | 130 | return $this->_viewPath; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | + /** |
|
| 134 | + * @param string $file |
|
| 135 | + */ |
|
| 133 | 136 | public function render($file, $data) |
| 134 | 137 | { |
| 135 | 138 | return Yii::$app->view->render($file, $data, $this); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | return $this->render('summary', [ |
| 51 | 51 | 'url' => $this->getUrl(), |
| 52 | 52 | 'count' => count($timings), |
| 53 | - 'total' => number_format($total * 1000) . ' ms', |
|
| 53 | + 'total' => number_format($total * 1000).' ms', |
|
| 54 | 54 | ]); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | public function getViewPath() |
| 125 | 125 | { |
| 126 | 126 | if ($this->_viewPath === null) { |
| 127 | - $this->_viewPath = dirname(__DIR__) . '/views/debug'; |
|
| 127 | + $this->_viewPath = dirname(__DIR__).'/views/debug'; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | return $this->_viewPath; |
@@ -133,6 +133,10 @@ |
||
| 133 | 133 | return $this; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | + /** |
|
| 137 | + * @param string $name |
|
| 138 | + * @param boolean $value |
|
| 139 | + */ |
|
| 136 | 140 | public function addOption($name, $value) |
| 137 | 141 | { |
| 138 | 142 | if (!isset($this->options[$name])) { |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | ]), |
| 30 | 30 | 'container' => [ |
| 31 | 31 | 'singletons' => [ |
| 32 | - \hiqdev\hiart\ConnectionInterface::class => function () { |
|
| 32 | + \hiqdev\hiart\ConnectionInterface::class => function() { |
|
| 33 | 33 | return Yii::$app->get(Yii::$app->params['hiart.dbname']); |
| 34 | 34 | }, |
| 35 | 35 | ], |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | public function createFullUri() |
| 81 | 81 | { |
| 82 | - return ($this->isFullUri($this->uri) ? '' : $this->getDb()->getBaseUri()) . $this->uri; |
|
| 82 | + return ($this->isFullUri($this->uri) ? '' : $this->getDb()->getBaseUri()).$this->uri; |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | public function isFullUri($uri) |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $params = http_build_query($params, '', '&'); |
| 163 | 163 | } |
| 164 | 164 | if (!empty($params)) { |
| 165 | - $this->uri .= '?' . $params; |
|
| 165 | + $this->uri .= '?'.$params; |
|
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | 168 | |
@@ -87,6 +87,9 @@ |
||
| 87 | 87 | return ($this->isFullUri($this->uri) ? '' : $this->getDb()->getBaseUri()) . $this->uri; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string $uri |
|
| 92 | + */ |
|
| 90 | 93 | public function isFullUri($uri) |
| 91 | 94 | { |
| 92 | 95 | return preg_match('/^https?:\\/\\//i', $uri); |
@@ -24,10 +24,10 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $auth = $this->db->getAuth(); |
| 26 | 26 | if (isset($auth['headerToken'])) { |
| 27 | - $this->authHeaders['Authorization'] = 'token ' . $auth['headerToken']; |
|
| 27 | + $this->authHeaders['Authorization'] = 'token '.$auth['headerToken']; |
|
| 28 | 28 | } |
| 29 | 29 | if (isset($auth['headerBearer'])) { |
| 30 | - $this->authHeaders['Authorization'] = 'Bearer ' . $auth['headerBearer']; |
|
| 30 | + $this->authHeaders['Authorization'] = 'Bearer '.$auth['headerBearer']; |
|
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | - * @return mixed|string |
|
| 66 | + * @return string |
|
| 67 | 67 | */ |
| 68 | 68 | public function getRawData() |
| 69 | 69 | { |
@@ -207,6 +207,9 @@ |
||
| 207 | 207 | return $result === false ? false : true; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | + /** |
|
| 211 | + * @param string $defaultScenario |
|
| 212 | + */ |
|
| 210 | 213 | public function batchQuery($defaultScenario, $data = [], array $options = []) |
| 211 | 214 | { |
| 212 | 215 | $options['batch'] = true; |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | protected $_errorChecker; |
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | - * @param null $name |
|
| 81 | + * @param string $name |
|
| 82 | 82 | * @return ConnectionInterface|AbstractConnection |
| 83 | 83 | */ |
| 84 | 84 | public static function getDb($name = null, $class = ConnectionInterface::class) |
@@ -92,8 +92,8 @@ discard block |
||
| 92 | 92 | if (!empty($this->traces)) { |
| 93 | 93 | $result .= Html::ul($this->traces, [ |
| 94 | 94 | 'class' => 'trace', |
| 95 | - 'item' => function ($trace) { |
|
| 96 | - return '<li>' . $this->panel->getTraceLine($trace) . '</li>'; |
|
| 95 | + 'item' => function($trace) { |
|
| 96 | + return '<li>'.$this->panel->getTraceLine($trace).'</li>'; |
|
| 97 | 97 | }, |
| 98 | 98 | ]); |
| 99 | 99 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | { |
| 116 | 116 | $uri = rtrim($this->request->getFullUri(), '?'); |
| 117 | 117 | $sign = strpos($uri, '?') === false ? '?' : '&'; |
| 118 | - $newTabUrl = rtrim($uri, '&') . $sign . $this->request->getBody(); |
|
| 118 | + $newTabUrl = rtrim($uri, '&').$sign.$this->request->getBody(); |
|
| 119 | 119 | |
| 120 | 120 | return Html::a('to new tab', $newTabUrl, ['target' => '_blank']); |
| 121 | 121 | } |