Passed
Pull Request — master (#46)
by Paweł
02:52
created
commands/StatsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     private function whereInterval($interval): Expression
139 139
     {
140 140
         return new Expression('DATE_FORMAT(created_at, \'%Y-%m-%d %H\') > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL :interval HOUR), \'%Y-%m-%d %H\')', [
141
-            'interval' => (int)$interval,
141
+            'interval' => (int) $interval,
142 142
         ]);
143 143
     }
144 144
 }
145 145
\ No newline at end of file
Please login to merge, or discard this patch.
config/container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 return [
4 4
     'definitions' => [
5 5
         \yii\behaviors\TimestampBehavior::class => [
6
-            'value' => function () {
6
+            'value' => function() {
7 7
                 return (new DateTime('now', new DateTimeZone('UTC')))->format('Y-m-d H:i:s');
8 8
             },
9 9
         ],
Please login to merge, or discard this patch.
modules/admin/controllers/MonitoringController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
                 if ($account->save()) {
54 54
                     \Yii::$app->session->setFlash('success', 'OK!');
55 55
                     $accountManager = \Yii::createObject(AccountManager::class);
56
-                    $accountManager->updateTags($account, (array)$form->tags);
56
+                    $accountManager->updateTags($account, (array) $form->tags);
57 57
                 } else {
58 58
                     \Yii::error('Validation error: ' . json_encode($account->errors), __METHOD__);
59 59
                     \Yii::$app->session->setFlash('error', 'ERR!');
Please login to merge, or discard this patch.
components/AccountManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
     public function saveUsernames(array $usernames)
151 151
     {
152 152
         $createdAt = (new \DateTime())->format('Y-m-d H:i:s');
153
-        $rows = array_map(function ($username) use ($createdAt) {
153
+        $rows = array_map(function($username) use ($createdAt) {
154 154
             return [
155 155
                 $username,
156 156
                 $createdAt,
Please login to merge, or discard this patch.
modules/admin/views/account/dashboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
                                     [
169 169
                                         'label' => $model->lastAccountStats->getAttributeLabel('er'),
170 170
                                         'yAxisID' => 'er',
171
-                                        'data' => array_map(function ($item) {
171
+                                        'data' => array_map(function($item) {
172 172
                                             return number_format($item * 100, 2);
173 173
                                         }, ArrayHelper::getColumn($dailyStatsData, 'er')),
174 174
                                         'fill' => false,
Please login to merge, or discard this patch.
views/preview/account.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
                                     [
169 169
                                         'label' => $model->lastAccountStats->getAttributeLabel('er'),
170 170
                                         'yAxisID' => 'er',
171
-                                        'data' => array_map(function ($item) {
171
+                                        'data' => array_map(function($item) {
172 172
                                             return number_format($item * 100, 2);
173 173
                                         }, ArrayHelper::getColumn($dailyStatsData, 'er')),
174 174
                                         'fill' => false,
Please login to merge, or discard this patch.
modules/admin/views/monitoring/accounts.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 ['class' => \yii\grid\SerialColumn::class],
31 31
                 [
32 32
                     'attribute' => 'username',
33
-                    'content' => function (\app\models\Account $model) {
33
+                    'content' => function(\app\models\Account $model) {
34 34
                         $html = [];
35 35
                         if ($model->disabled) {
36 36
                             $html[] = '<span class="fa fa-exclamation-triangle text-danger" title="Not found."></span>';
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 ],
65 65
                 [
66 66
                     'attribute' => 's_tags',
67
-                    'value' => function (Account $model) {
67
+                    'value' => function(Account $model) {
68 68
                         $tags = $model->getTags()->select('tag.name')->column();
69 69
                         if ($tags) {
70 70
                             return implode(', ', $tags);
Please login to merge, or discard this patch.
modules/admin/views/account/media-accounts.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                             [
35 35
                                 'attribute' => 'username',
36 36
                                 'format' => 'raw',
37
-                                'value' => function (Account $model, $key, $index, $column) {
37
+                                'value' => function(Account $model, $key, $index, $column) {
38 38
                                     if ($model->monitoring) {
39 39
                                         $value = Html::a($model->usernamePrefixed, ['account/dashboard', 'id' => $model->id]);
40 40
                                     } else {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                             ],
47 47
                             [
48 48
                                 'label' => 'Er',
49
-                                'value' => function (Account $account) use ($formatter) {
49
+                                'value' => function(Account $account) use ($formatter) {
50 50
                                     if ($account->lastAccountStats) {
51 51
                                         $er = $account->lastAccountStats->er;
52 52
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                             'occurs',
60 60
                             [
61 61
                                 'format' => 'raw',
62
-                                'value' => function (Account $account) use ($model) {
62
+                                'value' => function(Account $account) use ($model) {
63 63
                                     return OnOffMonitoringButton::widget([
64 64
                                         'model' => $account,
65 65
                                         'form' => new AccountMonitoringForm([
Please login to merge, or discard this patch.
models/Account.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                     BaseActiveRecord::EVENT_BEFORE_UPDATE => ['uid'],
66 66
                 ],
67 67
                 'preserveNonEmptyValues' => true,
68
-                'value' => function () {
68
+                'value' => function() {
69 69
                     do {
70 70
                         $uid = Yii::$app->security->generateRandomString(64);
71 71
                         $uidExist = static::find()
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             [['updated_at', 'created_at'], 'safe'],
108 108
             [['proxy_id', 'proxy_tag_id', 'occurs'], 'integer'],
109 109
             [['name', 'username', 'profile_pic_url', 'full_name', 'biography', 'external_url', 'instagram_id', 'notes', 'uid'], 'string', 'max' => 255],
110
-            [['monitoring','disabled'], 'boolean'],
110
+            [['monitoring', 'disabled'], 'boolean'],
111 111
             [['username'], 'unique'],
112 112
             [['proxy_id'], 'exist', 'skipOnError' => true, 'targetClass' => Proxy::class, 'targetAttribute' => ['proxy_id' => 'id']],
113 113
             [['proxy_tag_id'], 'exist', 'skipOnError' => true, 'targetClass' => Tag::class, 'targetAttribute' => ['proxy_tag_id' => 'id']],
Please login to merge, or discard this patch.