Passed
Pull Request — master (#190)
by Corey
03:07
created
common/components/Graph.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $path = Yii::getAlias('@graphImgPath');
33 33
         $filename = $this->user->getIdHash() . ".png";
34
-        return $path. '/' . $filename;
34
+        return $path . '/' . $filename;
35 35
     }
36 36
 
37 37
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         // format the data into something nicer
101 101
         $accum = [];
102 102
         foreach ($checkins as $checkin_sum) {
103
-            for ($i = 1; $i <= 7; $i ++) {
103
+            for ($i = 1; $i <= 7; $i++) {
104 104
                 $accum[$i][] = array_key_exists($i, $checkin_sum) ? $checkin_sum[$i]['count'] : 0;
105 105
             }
106 106
         }
Please login to merge, or discard this patch.
common/components/Controller.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
     {
30 30
         return [
31 31
       'error' => [
32
-         'class' => 'yii\web\ErrorAction',
33
-       ],
32
+          'class' => 'yii\web\ErrorAction',
33
+        ],
34 34
       'captcha' => [
35 35
         'class' => 'yii\captcha\CaptchaAction',
36 36
       ],
Please login to merge, or discard this patch.
common/models/UserBehavior.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
         return AH::map(
124 124
             $user_behaviors,
125 125
             'id',
126
-            function ($a) {
126
+            function($a) {
127 127
           return AH::getValue($a, 'behavior.name', $a['custom_behavior']);
128 128
       },
129
-            function ($b) {
129
+            function($b) {
130 130
           return $b['category_id'];
131 131
       }
132 132
         );
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function getCheckinBreakdown(int $period = 30)
136 136
     {
137 137
         $datetimes = $this->time->getDateTimesInPeriod($period);
138
-        $key = "checkins_".Yii::$app->user->id."_{$period}_".$this->time->getLocalDate();
138
+        $key = "checkins_" . Yii::$app->user->id . "_{$period}_" . $this->time->getLocalDate();
139 139
         $checkins = Yii::$app->cache->get($key);
140 140
 
141 141
         if ($checkins === false) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function getBehaviorsByCategory(array $decorated_behaviors)
168 168
     {
169
-        $arr = array_reduce($decorated_behaviors, function ($acc, $row) {
169
+        $arr = array_reduce($decorated_behaviors, function($acc, $row) {
170 170
             $cat_id = $row['category_id'];
171 171
             if (array_key_exists($cat_id, $acc)) {
172 172
                 $acc[$cat_id]['count'] += $row['count'];
Please login to merge, or discard this patch.
common/models/User.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     {
227 227
         $expire = \Yii::$app->params[$paramPath];
228 228
         $parts = explode('_', $token);
229
-        $timestamp = (int) end($parts);
229
+        $timestamp = (int)end($parts);
230 230
         if ($timestamp + $expire < time()) {
231 231
             // token expired
232 232
             return false;
@@ -404,15 +404,15 @@  discard block
 block discarded – undo
404 404
 
405 405
         // we should only proceed with sending the email if the user
406 406
     // scored above their set email threshold (User::email_category)
407
-    $this_checkin     = $checkins_last_month[$date]; // gets the check-in
407
+    $this_checkin = $checkins_last_month[$date]; // gets the check-in
408 408
     if (!$this_checkin) {
409 409
         return false;
410 410
     }                // sanity check
411
-    $highest_cat_data = end($this_checkin);          // gets the data for the highest category from the check-in
411
+    $highest_cat_data = end($this_checkin); // gets the data for the highest category from the check-in
412 412
     if (!$highest_cat_data) {
413 413
         return false;
414 414
     }             // another sanity check
415
-    $highest_cat_idx  = key($this_checkin);          // gets the key of the highest category
415
+    $highest_cat_idx = key($this_checkin); // gets the key of the highest category
416 416
 
417 417
     // if the highest category they reached today was less than
418 418
         // the category threshold they have set, don't send the email
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
           'behaviors_list' => \common\models\Behavior::$behaviors,
444 444
         ])->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name])
445 445
         ->setReplyTo($this->email)
446
-        ->setSubject($this->email." has completed a Faster Scale check-in")
446
+        ->setSubject($this->email . " has completed a Faster Scale check-in")
447 447
         ->setTo($email);
448 448
             }
449 449
         }
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
         return \Yii::$app->mailer->compose('signupNotification')
524 524
       ->setFrom([\Yii::$app->params['supportEmail'] => \Yii::$app->name])
525 525
       ->setTo(\Yii::$app->params['adminEmail'])
526
-      ->setSubject('A new user has signed up for '.\Yii::$app->name)
526
+      ->setSubject('A new user has signed up for ' . \Yii::$app->name)
527 527
       ->send();
528 528
     }
529 529
 
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
         return \Yii::$app->mailer->compose('verifyEmail', ['user' => $this])
533 533
       ->setFrom([\Yii::$app->params['supportEmail'] => \Yii::$app->name])
534 534
       ->setTo($this->email)
535
-      ->setSubject('Please verify your '.\Yii::$app->name .' account')
535
+      ->setSubject('Please verify your ' . \Yii::$app->name . ' account')
536 536
       ->send();
537 537
     }
538 538
 
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
           'email' => $email
547 547
         ])->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name])
548 548
         ->setReplyTo($this->email)
549
-        ->setSubject($this->email." has deleted their The Faster Scale App account")
549
+        ->setSubject($this->email . " has deleted their The Faster Scale App account")
550 550
         ->setTo($email);
551 551
             }
552 552
         }
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
         unset($row['custom_behavior']);
573 573
 
574 574
         // sort the array into a sensible order
575
-        uksort($row, function ($a, $b) {
575
+        uksort($row, function($a, $b) {
576 576
             return $this->export_order[$a] <=> $this->export_order[$b];
577 577
         });
578 578
         return $row;
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
         return rtrim(
599 599
             strtr(
600 600
           base64_encode(
601
-            hash('sha256', $this->id."::".$this->created_at, true)
601
+            hash('sha256', $this->id . "::" . $this->created_at, true)
602 602
         ),
603 603
           '+/',
604 604
           '-_'
Please login to merge, or discard this patch.
common/models/CustomBehavior.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -111,13 +111,13 @@
 block discarded – undo
111 111
       ], [
112 112
         'class' => 'kartik\grid\ActionColumn',
113 113
         'buttons' => [
114
-          'view' => function ($url, $model) {
114
+          'view' => function($url, $model) {
115 115
               return '';
116 116
           },
117
-          'update' => function ($url, $model) {
117
+          'update' => function($url, $model) {
118 118
               return '';
119 119
           },
120
-          'delete' => function ($url, $model) {
120
+          'delete' => function($url, $model) {
121 121
               return yii\helpers\Html::a('<span class="glyphicon glyphicon-remove"></span>', "/custom-behavior/delete?id={$model->id}", [
122 122
               'title' => 'Delete',
123 123
               'data-pjax' => true,
Please login to merge, or discard this patch.
common/models/LoginForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
         if ($this->validate()) {
65 65
             $user = $this->getUser();
66 66
             if ($user->isVerified()) {
67
-                return Yii::$app->user->login($user, $this->rememberMe ? 3600 * 24 * 30 : 0);
67
+                return Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0);
68 68
             } else {
69 69
                 Yii::$app->session->setFlash('warning', 'You must verify your account before you can proceed. Please check your email inbox for a verification email and follow the instructions.');
70 70
             }
Please login to merge, or discard this patch.
common/models/Category.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
 class Category extends \yii\base\BaseObject implements \common\interfaces\CategoryInterface
13 13
 {
14 14
     public static $categories = [
15
-    [ "id" => 1, "name" => "Restoration"],
16
-    [ "id" => 2, "name" => "Forgetting Priorities"],
17
-    [ "id" => 3, "name" => "Anxiety"],
18
-    [ "id" => 4, "name" => "Speeding Up"],
19
-    [ "id" => 5, "name" => "Ticked Off"],
20
-    [ "id" => 6, "name" => "Exhausted"],
21
-    [ "id" => 7, "name" => "Relapse/Moral Failure"],
15
+    ["id" => 1, "name" => "Restoration"],
16
+    ["id" => 2, "name" => "Forgetting Priorities"],
17
+    ["id" => 3, "name" => "Anxiety"],
18
+    ["id" => 4, "name" => "Speeding Up"],
19
+    ["id" => 5, "name" => "Ticked Off"],
20
+    ["id" => 6, "name" => "Exhausted"],
21
+    ["id" => 7, "name" => "Relapse/Moral Failure"],
22 22
   ];
23 23
 
24 24
     public static $colors = [
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public static function getCategory($key, $val)
104 104
     {
105
-        $ret = array_values(array_filter(self::$categories, function ($cat) use ($key, $val) {
105
+        $ret = array_values(array_filter(self::$categories, function($cat) use ($key, $val) {
106 106
             return $cat[$key] === $val;
107 107
         }));
108 108
         return $ret ? $ret[0] : null;
Please login to merge, or discard this patch.
common/models/Behavior.php 1 patch
Spacing   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -14,103 +14,103 @@  discard block
 block discarded – undo
14 14
 class Behavior extends \yii\base\BaseObject implements BehaviorInterface
15 15
 {
16 16
     public static $behaviors = [
17
-    ['id' => 1,   'name' => 'no current secrets', 'category_id' => 1],
18
-    ['id' => 2,   'name' => 'resolving problems', 'category_id' => 1],
19
-    ['id' => 3,   'name' => 'identifying fears and feelings', 'category_id' => 1],
20
-    ['id' => 4,   'name' => 'keeping commitments to meetings, prayer, family, church, people, goals, and self', 'category_id' => 1],
21
-    ['id' => 5,   'name' => 'being open', 'category_id' => 1],
22
-    ['id' => 6,   'name' => 'being honest', 'category_id' => 1],
23
-    ['id' => 7,   'name' => 'making eye contact', 'category_id' => 1],
24
-    ['id' => 8,   'name' => 'reaching out to others', 'category_id' => 1],
25
-    ['id' => 9,   'name' => 'increasing in relationships with God and others', 'category_id' => 1],
26
-    ['id' => 10,  'name' => 'accountability', 'category_id' => 1],
27
-    ['id' => 11,  'name' => 'secrets', 'category_id' => 2],
28
-    ['id' => 12,  'name' => 'bored', 'category_id' => 2],
29
-    ['id' => 13,  'name' => 'less time/energy for God, meetings, and church', 'category_id' => 2],
30
-    ['id' => 14,  'name' => 'avoiding support and accountability towards people', 'category_id' => 2],
31
-    ['id' => 15,  'name' => 'superficial conversations', 'category_id' => 2],
32
-    ['id' => 16,  'name' => 'sarcasm', 'category_id' => 2],
33
-    ['id' => 17,  'name' => 'isolating yourself', 'category_id' => 2],
34
-    ['id' => 18,  'name' => 'changes in goals', 'category_id' => 2],
35
-    ['id' => 19,  'name' => 'flirting', 'category_id' => 2],
36
-    ['id' => 20,  'name' => 'obsessed with relationships', 'category_id' => 2],
37
-    ['id' => 21,  'name' => 'breaking promises/commitments', 'category_id' => 2],
38
-    ['id' => 22,  'name' => 'neglecting family', 'category_id' => 2],
39
-    ['id' => 23,  'name' => 'preoccupation with material things, television, or entertainment', 'category_id' => 2],
40
-    ['id' => 24,  'name' => 'procrastination', 'category_id' => 2],
41
-    ['id' => 25,  'name' => 'lying', 'category_id' => 2],
42
-    ['id' => 26,  'name' => 'over-confidence', 'category_id' => 2],
43
-    ['id' => 27,  'name' => 'hiding money', 'category_id' => 2],
44
-    ['id' => 28,  'name' => 'worry', 'category_id' => 3],
45
-    ['id' => 29,  'name' => 'using profanity', 'category_id' => 3],
46
-    ['id' => 30,  'name' => 'being fearful', 'category_id' => 3],
47
-    ['id' => 31,  'name' => 'being resentful', 'category_id' => 3],
48
-    ['id' => 32,  'name' => 'replaying old, negative thoughts', 'category_id' => 3],
49
-    ['id' => 33,  'name' => 'perfectionism', 'category_id' => 3],
50
-    ['id' => 34,  'name' => 'judging others\' motives', 'category_id' => 3],
51
-    ['id' => 35,  'name' => 'making goals and lists you can\'t complete', 'category_id' => 3],
52
-    ['id' => 36,  'name' => 'poor planning', 'category_id' => 3],
53
-    ['id' => 37,  'name' => 'mind reading', 'category_id' => 3],
54
-    ['id' => 38,  'name' => 'fantasy', 'category_id' => 3],
55
-    ['id' => 41,  'name' => 'co-dependent rescuing', 'category_id' => 3],
56
-    ['id' => 42,  'name' => 'sleep problems', 'category_id' => 3],
57
-    ['id' => 43,  'name' => 'trouble concentrating', 'category_id' => 3],
58
-    ['id' => 44,  'name' => 'seeking/creating drama', 'category_id' => 3],
59
-    ['id' => 45,  'name' => 'gossip', 'category_id' => 3],
60
-    ['id' => 46,  'name' => 'using over-the-counter medication for pain, sleep, and weight control', 'category_id' => 3],
61
-    ['id' => 47,  'name' => 'super busy', 'category_id' => 4],
62
-    ['id' => 48,  'name' => 'workaholic', 'category_id' => 4],
63
-    ['id' => 49,  'name' => 'can\'t relax', 'category_id' => 4],
64
-    ['id' => 50,  'name' => 'driving too fast', 'category_id' => 4],
65
-    ['id' => 51,  'name' => 'avoiding slowing down', 'category_id' => 4],
66
-    ['id' => 52,  'name' => 'feeling driven', 'category_id' => 4],
67
-    ['id' => 53,  'name' => 'in a hurry', 'category_id' => 4],
68
-    ['id' => 54,  'name' => 'can\'t turn off thoughts', 'category_id' => 4],
69
-    ['id' => 55,  'name' => 'skipping meals', 'category_id' => 4],
70
-    ['id' => 56,  'name' => 'binge eating (usually at night)', 'category_id' => 4],
71
-    ['id' => 57,  'name' => 'overspending', 'category_id' => 4],
72
-    ['id' => 58,  'name' => 'can\'t identify own feelings/needs', 'category_id' => 4],
73
-    ['id' => 59,  'name' => 'repetitive, negative thoughts', 'category_id' => 4],
74
-    ['id' => 60,  'name' => 'irritable', 'category_id' => 4],
75
-    ['id' => 61,  'name' => 'making excuses for "having to do it all"', 'category_id' => 4],
76
-    ['id' => 62,  'name' => 'dramatic mood swings', 'category_id' => 4],
77
-    ['id' => 63,  'name' => 'lust', 'category_id' => 4],
78
-    ['id' => 64,  'name' => 'too much caffeine', 'category_id' => 4],
79
-    ['id' => 65,  'name' => 'over exercising', 'category_id' => 4],
80
-    ['id' => 66,  'name' => 'nervousness', 'category_id' => 4],
81
-    ['id' => 67,  'name' => 'difficulty being alone or with people', 'category_id' => 4],
82
-    ['id' => 68,  'name' => 'difficulty listening to others', 'category_id' => 4],
83
-    ['id' => 69,  'name' => 'avoiding support', 'category_id' => 4],
84
-    ['id' => 70,  'name' => 'procrastination causing crises in money, work, or relationships', 'category_id' => 5],
85
-    ['id' => 71,  'name' => 'sarcasm', 'category_id' => 5],
86
-    ['id' => 72,  'name' => 'black and white, all or nothing thinking', 'category_id' => 5],
87
-    ['id' => 73,  'name' => 'feeling that no one understands', 'category_id' => 5],
88
-    ['id' => 74,  'name' => 'overreacting', 'category_id' => 5],
89
-    ['id' => 75,  'name' => 'road rage', 'category_id' => 5],
90
-    ['id' => 76,  'name' => 'constant resentments', 'category_id' => 5],
91
-    ['id' => 77,  'name' => 'pushing others away', 'category_id' => 5],
92
-    ['id' => 78,  'name' => 'increased isolation', 'category_id' => 5],
93
-    ['id' => 79,  'name' => 'blaming', 'category_id' => 5],
94
-    ['id' => 80,  'name' => 'self pity', 'category_id' => 5],
95
-    ['id' => 81,  'name' => 'arguing', 'category_id' => 5],
96
-    ['id' => 82,  'name' => 'irrationality', 'category_id' => 5],
97
-    ['id' => 83,  'name' => 'can\'t handle criticism', 'category_id' => 5],
98
-    ['id' => 84,  'name' => 'defensive', 'category_id' => 5],
99
-    ['id' => 85,  'name' => 'people are avoiding you', 'category_id' => 5],
100
-    ['id' => 86,  'name' => 'having to be right', 'category_id' => 5],
101
-    ['id' => 87,  'name' => 'digestive problems', 'category_id' => 5],
102
-    ['id' => 88,  'name' => 'headaches', 'category_id' => 5],
103
-    ['id' => 89,  'name' => 'obsessive (stuck) thoughts', 'category_id' => 5],
104
-    ['id' => 90,  'name' => 'can\'t forgive', 'category_id' => 5],
105
-    ['id' => 91,  'name' => 'feeling grandiose (superior)', 'category_id' => 5],
106
-    ['id' => 92,  'name' => 'intimidation', 'category_id' => 5],
107
-    ['id' => 93,  'name' => 'feeling aggressive', 'category_id' => 5],
108
-    ['id' => 94,  'name' => 'depressed', 'category_id' => 6],
109
-    ['id' => 95,  'name' => 'panicked', 'category_id' => 6],
110
-    ['id' => 96,  'name' => 'confused', 'category_id' => 6],
111
-    ['id' => 97,  'name' => 'hopeless', 'category_id' => 6],
112
-    ['id' => 98,  'name' => 'sleeping too much or too little', 'category_id' => 6],
113
-    ['id' => 99,  'name' => 'can\'t cope', 'category_id' => 6],
17
+    ['id' => 1, 'name' => 'no current secrets', 'category_id' => 1],
18
+    ['id' => 2, 'name' => 'resolving problems', 'category_id' => 1],
19
+    ['id' => 3, 'name' => 'identifying fears and feelings', 'category_id' => 1],
20
+    ['id' => 4, 'name' => 'keeping commitments to meetings, prayer, family, church, people, goals, and self', 'category_id' => 1],
21
+    ['id' => 5, 'name' => 'being open', 'category_id' => 1],
22
+    ['id' => 6, 'name' => 'being honest', 'category_id' => 1],
23
+    ['id' => 7, 'name' => 'making eye contact', 'category_id' => 1],
24
+    ['id' => 8, 'name' => 'reaching out to others', 'category_id' => 1],
25
+    ['id' => 9, 'name' => 'increasing in relationships with God and others', 'category_id' => 1],
26
+    ['id' => 10, 'name' => 'accountability', 'category_id' => 1],
27
+    ['id' => 11, 'name' => 'secrets', 'category_id' => 2],
28
+    ['id' => 12, 'name' => 'bored', 'category_id' => 2],
29
+    ['id' => 13, 'name' => 'less time/energy for God, meetings, and church', 'category_id' => 2],
30
+    ['id' => 14, 'name' => 'avoiding support and accountability towards people', 'category_id' => 2],
31
+    ['id' => 15, 'name' => 'superficial conversations', 'category_id' => 2],
32
+    ['id' => 16, 'name' => 'sarcasm', 'category_id' => 2],
33
+    ['id' => 17, 'name' => 'isolating yourself', 'category_id' => 2],
34
+    ['id' => 18, 'name' => 'changes in goals', 'category_id' => 2],
35
+    ['id' => 19, 'name' => 'flirting', 'category_id' => 2],
36
+    ['id' => 20, 'name' => 'obsessed with relationships', 'category_id' => 2],
37
+    ['id' => 21, 'name' => 'breaking promises/commitments', 'category_id' => 2],
38
+    ['id' => 22, 'name' => 'neglecting family', 'category_id' => 2],
39
+    ['id' => 23, 'name' => 'preoccupation with material things, television, or entertainment', 'category_id' => 2],
40
+    ['id' => 24, 'name' => 'procrastination', 'category_id' => 2],
41
+    ['id' => 25, 'name' => 'lying', 'category_id' => 2],
42
+    ['id' => 26, 'name' => 'over-confidence', 'category_id' => 2],
43
+    ['id' => 27, 'name' => 'hiding money', 'category_id' => 2],
44
+    ['id' => 28, 'name' => 'worry', 'category_id' => 3],
45
+    ['id' => 29, 'name' => 'using profanity', 'category_id' => 3],
46
+    ['id' => 30, 'name' => 'being fearful', 'category_id' => 3],
47
+    ['id' => 31, 'name' => 'being resentful', 'category_id' => 3],
48
+    ['id' => 32, 'name' => 'replaying old, negative thoughts', 'category_id' => 3],
49
+    ['id' => 33, 'name' => 'perfectionism', 'category_id' => 3],
50
+    ['id' => 34, 'name' => 'judging others\' motives', 'category_id' => 3],
51
+    ['id' => 35, 'name' => 'making goals and lists you can\'t complete', 'category_id' => 3],
52
+    ['id' => 36, 'name' => 'poor planning', 'category_id' => 3],
53
+    ['id' => 37, 'name' => 'mind reading', 'category_id' => 3],
54
+    ['id' => 38, 'name' => 'fantasy', 'category_id' => 3],
55
+    ['id' => 41, 'name' => 'co-dependent rescuing', 'category_id' => 3],
56
+    ['id' => 42, 'name' => 'sleep problems', 'category_id' => 3],
57
+    ['id' => 43, 'name' => 'trouble concentrating', 'category_id' => 3],
58
+    ['id' => 44, 'name' => 'seeking/creating drama', 'category_id' => 3],
59
+    ['id' => 45, 'name' => 'gossip', 'category_id' => 3],
60
+    ['id' => 46, 'name' => 'using over-the-counter medication for pain, sleep, and weight control', 'category_id' => 3],
61
+    ['id' => 47, 'name' => 'super busy', 'category_id' => 4],
62
+    ['id' => 48, 'name' => 'workaholic', 'category_id' => 4],
63
+    ['id' => 49, 'name' => 'can\'t relax', 'category_id' => 4],
64
+    ['id' => 50, 'name' => 'driving too fast', 'category_id' => 4],
65
+    ['id' => 51, 'name' => 'avoiding slowing down', 'category_id' => 4],
66
+    ['id' => 52, 'name' => 'feeling driven', 'category_id' => 4],
67
+    ['id' => 53, 'name' => 'in a hurry', 'category_id' => 4],
68
+    ['id' => 54, 'name' => 'can\'t turn off thoughts', 'category_id' => 4],
69
+    ['id' => 55, 'name' => 'skipping meals', 'category_id' => 4],
70
+    ['id' => 56, 'name' => 'binge eating (usually at night)', 'category_id' => 4],
71
+    ['id' => 57, 'name' => 'overspending', 'category_id' => 4],
72
+    ['id' => 58, 'name' => 'can\'t identify own feelings/needs', 'category_id' => 4],
73
+    ['id' => 59, 'name' => 'repetitive, negative thoughts', 'category_id' => 4],
74
+    ['id' => 60, 'name' => 'irritable', 'category_id' => 4],
75
+    ['id' => 61, 'name' => 'making excuses for "having to do it all"', 'category_id' => 4],
76
+    ['id' => 62, 'name' => 'dramatic mood swings', 'category_id' => 4],
77
+    ['id' => 63, 'name' => 'lust', 'category_id' => 4],
78
+    ['id' => 64, 'name' => 'too much caffeine', 'category_id' => 4],
79
+    ['id' => 65, 'name' => 'over exercising', 'category_id' => 4],
80
+    ['id' => 66, 'name' => 'nervousness', 'category_id' => 4],
81
+    ['id' => 67, 'name' => 'difficulty being alone or with people', 'category_id' => 4],
82
+    ['id' => 68, 'name' => 'difficulty listening to others', 'category_id' => 4],
83
+    ['id' => 69, 'name' => 'avoiding support', 'category_id' => 4],
84
+    ['id' => 70, 'name' => 'procrastination causing crises in money, work, or relationships', 'category_id' => 5],
85
+    ['id' => 71, 'name' => 'sarcasm', 'category_id' => 5],
86
+    ['id' => 72, 'name' => 'black and white, all or nothing thinking', 'category_id' => 5],
87
+    ['id' => 73, 'name' => 'feeling that no one understands', 'category_id' => 5],
88
+    ['id' => 74, 'name' => 'overreacting', 'category_id' => 5],
89
+    ['id' => 75, 'name' => 'road rage', 'category_id' => 5],
90
+    ['id' => 76, 'name' => 'constant resentments', 'category_id' => 5],
91
+    ['id' => 77, 'name' => 'pushing others away', 'category_id' => 5],
92
+    ['id' => 78, 'name' => 'increased isolation', 'category_id' => 5],
93
+    ['id' => 79, 'name' => 'blaming', 'category_id' => 5],
94
+    ['id' => 80, 'name' => 'self pity', 'category_id' => 5],
95
+    ['id' => 81, 'name' => 'arguing', 'category_id' => 5],
96
+    ['id' => 82, 'name' => 'irrationality', 'category_id' => 5],
97
+    ['id' => 83, 'name' => 'can\'t handle criticism', 'category_id' => 5],
98
+    ['id' => 84, 'name' => 'defensive', 'category_id' => 5],
99
+    ['id' => 85, 'name' => 'people are avoiding you', 'category_id' => 5],
100
+    ['id' => 86, 'name' => 'having to be right', 'category_id' => 5],
101
+    ['id' => 87, 'name' => 'digestive problems', 'category_id' => 5],
102
+    ['id' => 88, 'name' => 'headaches', 'category_id' => 5],
103
+    ['id' => 89, 'name' => 'obsessive (stuck) thoughts', 'category_id' => 5],
104
+    ['id' => 90, 'name' => 'can\'t forgive', 'category_id' => 5],
105
+    ['id' => 91, 'name' => 'feeling grandiose (superior)', 'category_id' => 5],
106
+    ['id' => 92, 'name' => 'intimidation', 'category_id' => 5],
107
+    ['id' => 93, 'name' => 'feeling aggressive', 'category_id' => 5],
108
+    ['id' => 94, 'name' => 'depressed', 'category_id' => 6],
109
+    ['id' => 95, 'name' => 'panicked', 'category_id' => 6],
110
+    ['id' => 96, 'name' => 'confused', 'category_id' => 6],
111
+    ['id' => 97, 'name' => 'hopeless', 'category_id' => 6],
112
+    ['id' => 98, 'name' => 'sleeping too much or too little', 'category_id' => 6],
113
+    ['id' => 99, 'name' => 'can\'t cope', 'category_id' => 6],
114 114
     ['id' => 100, 'name' => 'overwhelmed', 'category_id' => 6],
115 115
     ['id' => 101, 'name' => 'crying for "no reason"', 'category_id' => 6],
116 116
     ['id' => 102, 'name' => 'can\'t think', 'category_id' => 6],
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public static function getBehavior($key, $val)
208 208
     {
209
-        $ret = array_values(array_filter(self::$behaviors, function ($bvr) use ($key, $val) {
209
+        $ret = array_values(array_filter(self::$behaviors, function($bvr) use ($key, $val) {
210 210
             return $bvr[$key] === $val;
211 211
         }));
212 212
         return $ret ? $ret[0] : null;
Please login to merge, or discard this patch.
common/tests/unit/components/GraphTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
     use \Codeception\Specify;
15 15
 
16 16
     private $user;
17
-    private $filepath = __DIR__.'/../../_output/test_graph.png';
18
-    private $filepath_extra = __DIR__.'/../../_output/charts/test_graph.png';
17
+    private $filepath = __DIR__ . '/../../_output/test_graph.png';
18
+    private $filepath_extra = __DIR__ . '/../../_output/charts/test_graph.png';
19 19
 
20 20
     public function setUp(): void
21 21
     {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
       ->willReturn('random1DH4sh');
40 40
         $graph = new Graph($this->user);
41 41
 
42
-        expect('the expected graph image filepath will be returned', $this->assertEquals(dirname(dirname(dirname(dirname(__DIR__)))).'/site/web/charts/random1DH4sh.png', $graph->getFilepath()));
42
+        expect('the expected graph image filepath will be returned', $this->assertEquals(dirname(dirname(dirname(dirname(__DIR__)))) . '/site/web/charts/random1DH4sh.png', $graph->getFilepath()));
43 43
     }
44 44
 
45 45
     public function testGetUrl()
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
       '2019-02-27' => [],
238 238
       '2019-02-28' => [],
239 239
       '2019-03-01' => [
240
-        2 => [ 'name' => 'Forgetting Priorities',
240
+        2 => ['name' => 'Forgetting Priorities',
241 241
         'count' => 6,
242 242
         'color' => '#4CA100',
243 243
         'highlight' => '#61B219',
Please login to merge, or discard this patch.