Skip to content

Commit

Permalink
csfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Jul 12, 2016
1 parent bb80099 commit d6cc795
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace hiqdev\hiart;

use Yii;
use yii\base\InvalidConfigException;
use yii\base\NotSupportedException;
use yii\db\ActiveQueryInterface;
Expand All @@ -30,7 +31,7 @@ class ActiveRecord extends BaseActiveRecord
*/
public static function getDb()
{
return \Yii::$app->get('hiart');
return Yii::$app->get('hiart');
}

/**
Expand All @@ -41,10 +42,10 @@ public static function getDb()
public static function find($options = [])
{
$config = [
'class' => ActiveQuery::className(),
'class' => ActiveQuery::class,
'options' => $options,
];
return \Yii::createObject($config, [get_called_class()]);
return Yii::createObject($config, [get_called_class()]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/DebugAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function run($logId, $tag)
parse_str($body, $options);

/* @var $db Connection */
$db = \Yii::$app->get($this->db);
$db = Yii::$app->get($this->db);
$time = microtime(true);
switch ($method) {
case 'GET':
Expand Down
7 changes: 4 additions & 3 deletions src/DebugPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace hiqdev\hiart;

use Yii;
use yii\debug\Panel;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
Expand Down Expand Up @@ -81,7 +82,7 @@ public function getDetail()
$i = 0;
// Try to get API URL
try {
$component = \Yii::$app->get('hiart');
$component = Yii::$app->get('hiart');
$apiUrl = (StringHelper::endsWith($component->config['base_uri'],
'/')) ? $component->config['base_uri'] : $component->config['base_uri'] . '/';
} catch (\yii\base\InvalidConfigException $e) {
Expand Down Expand Up @@ -135,7 +136,7 @@ public function getDetail()
}
$rows = implode("\n", $rows);

\Yii::$app->view->registerCss(<<<CSS
Yii::$app->view->registerCss(<<<CSS
.string { color: green; }
.number { color: darkorange; }
.boolean { color: blue; }
Expand All @@ -144,7 +145,7 @@ public function getDetail()
CSS
);

\Yii::$app->view->registerJs(<<<JS
Yii::$app->view->registerJs(<<<JS
function syntaxHighlight(json) {
json = json.replace(/&/g, '&').replace(/</g, '&lt;').replace(/>/g, '&gt;');
return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
Expand Down

0 comments on commit d6cc795

Please sign in to comment.