@@ -23,23 +23,24 @@ |
||
23 | 23 | <td> |
24 | 24 | <?php |
25 | 25 | |
26 | - if (preg_match('/_{0,1}(size|length)_{0,1}/', $name)) |
|
27 | - echo $formatter->asSize($value); |
|
28 | - else if (strpos($name, 'speed') !== false) |
|
29 | - echo $formatter->asSize($value) . '/s'; |
|
30 | - else if (strpos($name, 'time') !== false && is_numeric($value) && $value >= 0) |
|
31 | - echo number_format($value, 2) . 's'; |
|
32 | - else if ($name == 'http_code') { |
|
26 | + if (preg_match('/_{0,1}(size|length)_{0,1}/', $name)) { |
|
27 | + echo $formatter->asSize($value); |
|
28 | + } else if (strpos($name, 'speed') !== false) { |
|
29 | + echo $formatter->asSize($value) . '/s'; |
|
30 | + } else if (strpos($name, 'time') !== false && is_numeric($value) && $value >= 0) { |
|
31 | + echo number_format($value, 2) . 's'; |
|
32 | + } else if ($name == 'http_code') { |
|
33 | 33 | $type = substr($value, 0, 1); |
34 | 34 | echo Html::tag('span', $value . (isset(Response::$httpStatuses[$value]) ? (' (' . Response::$httpStatuses[$value] . ')') : ''), |
35 | 35 | ['style' => 'color: '. ($type == 2 ? 'green' : ($type == 4 || $type == 5 ? 'red' : 'orange'))]); |
36 | - } |
|
37 | - else |
|
38 | - echo htmlspecialchars(VarDumper::dumpAsString($value), ENT_QUOTES|ENT_SUBSTITUTE, \Yii::$app->charset, true) |
|
36 | + } else { |
|
37 | + echo htmlspecialchars(VarDumper::dumpAsString($value), ENT_QUOTES|ENT_SUBSTITUTE, \Yii::$app->charset, true) |
|
39 | 38 | ?> |
40 | 39 | </td> |
41 | 40 | </tr> |
42 | - <?php endforeach; ?> |
|
41 | + <?php endforeach; |
|
42 | + } |
|
43 | + ?> |
|
43 | 44 | </tbody> |
44 | 45 | </table> |
45 | 46 | </div> |
@@ -24,11 +24,12 @@ |
||
24 | 24 | |
25 | 25 | if (isset($request['result'])) { |
26 | 26 | $xml = Helper::formatAsXML($request['result']); |
27 | - if ($xml) |
|
28 | - $tabs[] = [ |
|
27 | + if ($xml) { |
|
28 | + $tabs[] = [ |
|
29 | 29 | 'label' => \Yii::t('audit', 'Result - XML'), |
30 | 30 | 'content' => Html::tag('div', $xml, $preformatted) |
31 | 31 | ]; |
32 | + } |
|
32 | 33 | |
33 | 34 | $tabs[] = [ |
34 | 35 | 'label' => \Yii::t('audit', 'Result'), |
@@ -6,5 +6,6 @@ |
||
6 | 6 | |
7 | 7 | echo Html::tag('h1', $panel->name); |
8 | 8 | |
9 | -foreach ($dataProvider->allModels as $index => $request) |
|
9 | +foreach ($dataProvider->allModels as $index => $request) { |
|
10 | 10 | echo $this->render('detail', ['panel' => $panel, 'request' => $request, 'index' => $index + 1]); |
11 | +} |
@@ -28,10 +28,11 @@ |
||
28 | 28 | <th><?= Html::encode(\yii\helpers\Inflector::humanize($name)) ?></th> |
29 | 29 | <td> |
30 | 30 | <?php |
31 | - if (is_array($value) || is_object($value)) |
|
32 | - $value = \yii\helpers\ArrayHelper::toArray($value); |
|
33 | - elseif ($name == 'duration') |
|
34 | - $value = number_format($value, 2) . 's'; |
|
31 | + if (is_array($value) || is_object($value)) { |
|
32 | + $value = \yii\helpers\ArrayHelper::toArray($value); |
|
33 | + } elseif ($name == 'duration') { |
|
34 | + $value = number_format($value, 2) . 's'; |
|
35 | + } |
|
35 | 36 | echo $name == 'error' ? $value : $formatter->asText(is_scalar($value) ? $value : VarDumper::dumpAsString($value)); |
36 | 37 | ?> |
37 | 38 | </td> |