@@ -9,7 +9,7 @@ |
||
| 9 | 9 | $this->title = Yii::t('audit', 'Mail #{id}', ['id' => $model->id]); |
| 10 | 10 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Audit'), 'url' => ['default/index']]; |
| 11 | 11 | $this->params['breadcrumbs'][] = ['label' => Yii::t('audit', 'Mails'), 'url' => ['index']]; |
| 12 | -$this->params['breadcrumbs'][] = '#' . $model->id; |
|
| 12 | +$this->params['breadcrumbs'][] = '#'.$model->id; |
|
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | echo Yii::$app->formatter->asHtml($model->html); |
| 16 | 16 | \ No newline at end of file |
@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | public function getLabel() |
| 22 | 22 | { |
| 23 | 23 | $memory = isset($this->data['memory']) ? sprintf('%.1f MB', $this->data['memory'] / 1048576) : ''; |
| 24 | - $time = isset($this->data['time']) ? number_format($this->data['time'] * 1000) . ' ms' : ''; |
|
| 25 | - return $this->getName() . ' <small>(' . $memory . ' / ' . $time . ')</small>'; |
|
| 24 | + $time = isset($this->data['time']) ? number_format($this->data['time'] * 1000).' ms' : ''; |
|
| 25 | + return $this->getName().' <small>('.$memory.' / '.$time.')</small>'; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | 'dataProvider' => $dataProvider, |
| 39 | 39 | 'searchModel' => $searchModel, |
| 40 | 40 | 'memory' => isset($this->data['memory']) ? sprintf('%.1f MB', $this->data['memory'] / 1048576) : '', |
| 41 | - 'time' => isset($this->data['time']) ? number_format($this->data['time'] * 1000) . ' ms' : '', |
|
| 41 | + 'time' => isset($this->data['time']) ? number_format($this->data['time'] * 1000).' ms' : '', |
|
| 42 | 42 | ]); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -189,12 +189,12 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | protected function cleanAttributesOverride($attributes) |
| 191 | 191 | { |
| 192 | - if (sizeof($this->override) > 0 && sizeof($attributes) >0) { |
|
| 192 | + if (sizeof($this->override) > 0 && sizeof($attributes) > 0) { |
|
| 193 | 193 | foreach ($this->override as $field => $queryParams) { |
| 194 | 194 | $newOverrideValues = $this->getNewOverrideValues($attributes[$field], $queryParams); |
| 195 | 195 | $saveField = \yii\helpers\ArrayHelper::getValue($queryParams, 'saveField', $field); |
| 196 | 196 | |
| 197 | - if (count($newOverrideValues) >1) { |
|
| 197 | + if (count($newOverrideValues) > 1) { |
|
| 198 | 198 | $attributes[$saveField] = implode(', ', |
| 199 | 199 | \yii\helpers\ArrayHelper::map($newOverrideValues, $queryParams['returnField'], $queryParams['returnField']) |
| 200 | 200 | ); |
@@ -236,12 +236,12 @@ discard block |
||
| 236 | 236 | $oldAttributes = $this->cleanAttributes($this->getOldAttributes()); |
| 237 | 237 | |
| 238 | 238 | // ensure to handle serialized attributes properly |
| 239 | - foreach($newAttributes as $key => $value) |
|
| 240 | - if(is_array($newAttributes[$key])) |
|
| 239 | + foreach ($newAttributes as $key => $value) |
|
| 240 | + if (is_array($newAttributes[$key])) |
|
| 241 | 241 | $newAttributes[$key] = implode(',', $newAttributes[$key]); |
| 242 | 242 | |
| 243 | - foreach($oldAttributes as $key => $value) |
|
| 244 | - if(is_array($oldAttributes[$key])) |
|
| 243 | + foreach ($oldAttributes as $key => $value) |
|
| 244 | + if (is_array($oldAttributes[$key])) |
|
| 245 | 245 | $oldAttributes[$key] = implode(',', $oldAttributes[$key]); |
| 246 | 246 | |
| 247 | 247 | // If no difference then get out of here |