Passed
Push — master ( fd6a71...7ba57e )
by Paweł
02:21
created
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.
config/test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$webConfig = require __DIR__.'/web.php';
3
+$webConfig = require __DIR__ . '/web.php';
4 4
 
5 5
 $db = require __DIR__ . '/test_db.php';
6 6
 
Please login to merge, or discard this patch.
widgets/ProgressChart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
             $color = array_shift($this->colors);
71 71
             $data = ArrayHelper::getColumn($stats, $attribute);
72 72
             if ($attribute == 'er') {
73
-                $data = array_map(function ($item) {
73
+                $data = array_map(function($item) {
74 74
                     return number_format($item * 100, 2);
75 75
                 }, $data);
76 76
             }
Please login to merge, or discard this patch.
modules/admin/models/AccountSearch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      */
46 46
     public function search($params)
47 47
     {
48
-        $userId = (int)\Yii::$app->user->id;
48
+        $userId = (int) \Yii::$app->user->id;
49 49
 
50 50
         $query = Account::find()
51 51
             ->select([
Please login to merge, or discard this patch.
modules/admin/views/monitoring/tags.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
                     [
47 47
                         'attribute' => 'name',
48
-                        'content' => function (\app\models\Tag $model) {
48
+                        'content' => function(\app\models\Tag $model) {
49 49
                             $html = [];
50 50
                             $html[] = Html::a($model->namePrefixed, ['tag/stats', 'id' => $model->id]);
51 51
                             $html[] = Html::a('<span class="fa fa-external-link text-sm"></span>', Url::tag($model->name), ['target' => '_blank']);
Please login to merge, or discard this patch.
modules/admin/views/auth/login.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
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_signin.png'), ['/admin/auth/auth', 'authclient' => $client->getName(),]) ?>
22
+            <?= Html::a(Html::img('/img/btn_google_signin.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; ?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,12 @@
 block discarded – undo
20 20
     <div class="form-group text-center">
21 21
         <?php if ($client->getId() == 'google'): ?>
22 22
             <?= Html::a(Html::img('/img/btn_google_signin.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
Please login to merge, or discard this patch.
config/console.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@
 block discarded – undo
70 70
         'class' => 'yii\gii\Module',
71 71
     ];
72 72
     $config['modules']['fixture'] = [ // Fixture generation command line.
73
-      'class' => \yii\faker\FixtureController::class,
74
-      'templatePath' => 'tests/fixtures/templates',
75
-      'fixtureDataPath' => 'tests/fixtures/data',
76
-      'namespace' => 'app\tests\fixtures',
77
-      'count' => 10,
73
+        'class' => \yii\faker\FixtureController::class,
74
+        'templatePath' => 'tests/fixtures/templates',
75
+        'fixtureDataPath' => 'tests/fixtures/data',
76
+        'namespace' => 'app\tests\fixtures',
77
+        'count' => 10,
78 78
     ];
79 79
 }
80 80
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
     $config['modules']['gii'] = [
70 70
         'class' => 'yii\gii\Module',
71 71
     ];
72
-    $config['modules']['fixture'] = [ // Fixture generation command line.
72
+    $config['modules']['fixture'] = [// Fixture generation command line.
73 73
       'class' => \yii\faker\FixtureController::class,
74 74
       'templatePath' => 'tests/fixtures/templates',
75 75
       'fixtureDataPath' => 'tests/fixtures/data',
Please login to merge, or discard this patch.
web/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__.'/../config/env.php';
3
+require __DIR__ . '/../config/env.php';
4 4
 
5 5
 require __DIR__ . '/../vendor/autoload.php';
6 6
 require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
Please login to merge, or discard this patch.
components/CategoryManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $accounts = $accounts instanceof Account ? [$accounts->id] : ArrayHelper::getColumn($accounts, 'id');
44 44
 
45 45
         $q = Category::find()
46
-            ->innerJoin('account_category ac', 'category.id=ac.category_id AND ac.user_id=' . (int)$user->id)
46
+            ->innerJoin('account_category ac', 'category.id=ac.category_id AND ac.user_id=' . (int) $user->id)
47 47
             ->andFilterWhere(['ac.account_id' => $accounts]);
48 48
 
49 49
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $tags = $tags instanceof Tag ? [$tags->id] : ArrayHelper::getColumn($tags, 'id');
62 62
 
63 63
         $q = Category::find()
64
-            ->innerJoin('tag_category ac', 'category.id=ac.category_id AND ac.user_id=' . (int)$user->id)
64
+            ->innerJoin('tag_category ac', 'category.id=ac.category_id AND ac.user_id=' . (int) $user->id)
65 65
             ->andFilterWhere(['ac.tag_id' => $tags]);
66 66
 
67 67
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public function addToAccount(Account $account, array $categories, User $user)
101 101
     {
102 102
         $this->saveCategories($categories);
103
-        $rows = array_map(function ($categoryId) use ($account, $user) {
103
+        $rows = array_map(function($categoryId) use ($account, $user) {
104 104
             return [
105 105
                 $account->id,
106 106
                 $categoryId,
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
     public function saveCategories(array $categories)
161 161
     {
162
-        $rows = array_map(function ($category) {
162
+        $rows = array_map(function($category) {
163 163
             return [$category];
164 164
         }, $categories);
165 165
 
Please login to merge, or discard this patch.