hiqdev /
yii2-hiart
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * ActiveRecord for API |
||
| 4 | * |
||
| 5 | * @link https://github.com/hiqdev/yii2-hiart |
||
| 6 | * @package yii2-hiart |
||
| 7 | * @license BSD-3-Clause |
||
| 8 | * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/) |
||
| 9 | */ |
||
| 10 | |||
| 11 | namespace hiqdev\hiart\debug; |
||
| 12 | |||
| 13 | use Yii; |
||
| 14 | use yii\helpers\ArrayHelper; |
||
| 15 | use yii\web\HttpException; |
||
| 16 | use yii\web\Response; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Debug Action is used by [[DebugPanel]] to perform HiArt queries using ajax. |
||
| 20 | */ |
||
| 21 | class DebugAction extends \yii\base\Action |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var DebugPanel |
||
| 25 | */ |
||
| 26 | public $panel; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var \yii\debug\controllers\DefaultController |
||
|
0 ignored issues
–
show
|
|||
| 30 | */ |
||
| 31 | public $controller; |
||
| 32 | |||
| 33 | public function run($logId, $tag) |
||
| 34 | { |
||
| 35 | $this->controller->loadData($tag); |
||
| 36 | |||
| 37 | $timings = $this->panel->getTimings(); |
||
| 38 | ArrayHelper::multisort($timings, 3, SORT_DESC); |
||
| 39 | |||
| 40 | if (!isset($timings[$logId])) { |
||
| 41 | throw new HttpException(404, 'Log message not found.'); |
||
| 42 | } |
||
| 43 | |||
| 44 | $request = unserialize($timings[$logId][1]); |
||
| 45 | $time = microtime(true); |
||
| 46 | $response = $request->send(); |
||
| 47 | $time = microtime(true) - $time; |
||
| 48 | |||
| 49 | Yii::$app->response->format = Response::FORMAT_JSON; |
||
| 50 | |||
| 51 | return [ |
||
| 52 | 'time' => sprintf('%.1f ms', $time * 1000), |
||
| 53 | 'result' => $response->getData(), |
||
| 54 | ]; |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths