@@ -50,7 +50,7 @@ |
||
50 | 50 | ], |
51 | 51 | [ |
52 | 52 | 'format' => 'raw', |
53 | - 'value' => function (Tag $tag) use ($model) { |
|
53 | + 'value' => function(Tag $tag) use ($model) { |
|
54 | 54 | return OnOffMonitoringButton::widget([ |
55 | 55 | 'model' => $tag, |
56 | 56 | 'form' => new MonitoringForm([ |
@@ -19,9 +19,9 @@ |
||
19 | 19 | <?php foreach ($authAuthChoice->getClients() as $client): ?> |
20 | 20 | <div class="form-group text-center"> |
21 | 21 | <?php if ($client->getId() == 'google'): ?> |
22 | - <?= Html::a(Html::img('/img/btn_google_sign_in.png'), ['/admin/auth/auth', 'authclient' => $client->getName(),]) ?> |
|
22 | + <?= Html::a(Html::img('/img/btn_google_sign_in.png'), ['/admin/auth/auth', 'authclient' => $client->getName(), ]) ?> |
|
23 | 23 | <?php else: ?> |
24 | - <?= Html::a("<span class='fa fa-$client->name'></span> Sign in with " . $client->getTitle(), ['/admin/auth/auth', 'authclient' => $client->getName(),], ['class' => "btn btn-block btn-social btn-$client->name "]) ?> |
|
24 | + <?= Html::a("<span class='fa fa-$client->name'></span> Sign in with " . $client->getTitle(), ['/admin/auth/auth', 'authclient' => $client->getName(), ], ['class' => "btn btn-block btn-social btn-$client->name "]) ?> |
|
25 | 25 | <?php endif; ?> |
26 | 26 | </div> |
27 | 27 | <?php endforeach; ?> |
@@ -20,9 +20,12 @@ |
||
20 | 20 | <div class="form-group text-center"> |
21 | 21 | <?php if ($client->getId() == 'google'): ?> |
22 | 22 | <?= Html::a(Html::img('/img/btn_google_sign_in.png'), ['/admin/auth/auth', 'authclient' => $client->getName(),]) ?> |
23 | - <?php else: ?> |
|
23 | + <?php else { |
|
24 | + : ?> |
|
24 | 25 | <?= Html::a("<span class='fa fa-$client->name'></span> Sign in with " . $client->getTitle(), ['/admin/auth/auth', 'authclient' => $client->getName(),], ['class' => "btn btn-block btn-social btn-$client->name "]) ?> |
25 | - <?php endif; ?> |
|
26 | + <?php endif; |
|
27 | +} |
|
28 | +?> |
|
26 | 29 | </div> |
27 | 30 | <?php endforeach; ?> |
28 | 31 | <?php AuthChoice::end() ?> |
29 | 32 | \ No newline at end of file |
@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function search($params) |
48 | 48 | { |
49 | - $userId = (int)Yii::$app->user->id; |
|
49 | + $userId = (int) Yii::$app->user->id; |
|
50 | 50 | |
51 | 51 | $query = Account::find() |
52 | 52 | ->select([ |
@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | if ($interval === true) { // auto calculate |
26 | 26 | $interval = 1; |
27 | - for ($i = 1; $i <= (int)$model->invalidation_count; $i++) { |
|
27 | + for ($i = 1; $i <= (int) $model->invalidation_count; $i++) { |
|
28 | 28 | $interval *= $i; |
29 | 29 | } |
30 | 30 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | { |
47 | 47 | $formatter = Yii::$app->formatter; |
48 | 48 | |
49 | - return array_map(function ($label) use ($formatter) { |
|
49 | + return array_map(function($label) use ($formatter) { |
|
50 | 50 | return $formatter->format($label, $this->labelFormat); |
51 | 51 | }, $this->getKeys()); |
52 | 52 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | { |
58 | 58 | $formatter = Yii::$app->formatter; |
59 | 59 | |
60 | - return array_map(function ($label) use ($formatter) { |
|
60 | + return array_map(function($label) use ($formatter) { |
|
61 | 61 | return $formatter->format($label, $this->labelFormat); |
62 | 62 | }, $this->getKeys()); |
63 | 63 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | $data = ArrayHelper::getColumn($this->getModels(), $attribute); |
73 | 73 | if ($attribute == 'er') { |
74 | - $data = array_map(function ($item) { |
|
74 | + $data = array_map(function($item) { |
|
75 | 75 | return number_format($item * 100, 2); |
76 | 76 | }, $data); |
77 | 77 | } |
@@ -134,7 +134,7 @@ |
||
134 | 134 | */ |
135 | 135 | protected function findDataModels($ids) |
136 | 136 | { |
137 | - $columns = array_map(function ($attr) { |
|
137 | + $columns = array_map(function($attr) { |
|
138 | 138 | return "account_stats.{$attr}"; |
139 | 139 | }, $this->statsAttributes); |
140 | 140 | $columns[] = new Expression('DATE(created_at) as created_at'); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | protected function findDataModel(string $date, $ignoredStatsId = null) |
58 | 58 | { |
59 | - $columns = array_map(function ($attr) { |
|
59 | + $columns = array_map(function($attr) { |
|
60 | 60 | return "account_stats.{$attr}"; |
61 | 61 | }, $this->statsAttributes); |
62 | 62 | $columns[] = 'id'; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $toModels = $this->findDataModels($toStatsIds); |
24 | 24 | |
25 | 25 | // jesli znaleziona ostatnia data 'do' jest wczesniejsza niz od, to nie pomijaj modelu |
26 | - $ignoredModels = array_filter($toModels, function ($toModel) use ($dbFrom) { |
|
26 | + $ignoredModels = array_filter($toModels, function($toModel) use ($dbFrom) { |
|
27 | 27 | if (strtotime($toModel['created_at']) > strtotime($dbFrom)) { |
28 | 28 | return true; |
29 | 29 | } |