@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | expect('the form should validate correctly', $this->assertTrue($form->validate())); |
137 | 137 | $user = $form->signup(); |
138 | 138 | expect('signup() should return a newly-saved user when the user does not already exist with the submitted values', |
139 | - $this->assertEquals($user->getAttributes($this->whitelist), array_splice($this->vals, 1))); |
|
139 | + $this->assertEquals($user->getAttributes($this->whitelist), array_splice($this->vals, 1))); |
|
140 | 140 | expect('the "Remember Me" auth_key value should be set to a random string (defaults to a 32 char length)', |
141 | - $this->assertEquals(32, strlen($user->auth_key))); |
|
141 | + $this->assertEquals(32, strlen($user->auth_key))); |
|
142 | 142 | expect('password_hash to be set to something like a hash', |
143 | - $this->assertStringStartsWith('$2y$13$', $user->password_hash)); |
|
143 | + $this->assertStringStartsWith('$2y$13$', $user->password_hash)); |
|
144 | 144 | expect('when the user is created, signup() should call save()', |
145 | - $this->assertTrue($saved)); |
|
145 | + $this->assertTrue($saved)); |
|
146 | 146 | expect('This user should be an isNewRecord -- they should NOT already exist', $this->assertTrue($user->getIsNewRecord())); |
147 | 147 | }); |
148 | 148 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $user = $form3->signup(); |
187 | 187 | expect('This user should not be an isNewRecord -- they should already exist', $this->assertFalse($user->getIsNewRecord())); |
188 | 188 | expect('signup() should return a newly-saved user when the user does not already exist with the submitted values', |
189 | - $this->assertEquals($user->getAttributes($this->whitelist), array_splice($this->vals, 1))); |
|
189 | + $this->assertEquals($user->getAttributes($this->whitelist), array_splice($this->vals, 1))); |
|
190 | 190 | expect('when the user exists and is NOT confirmed, signup() should call save() to UPDATE their info', $this->assertTrue($saved)); |
191 | 191 | }); |
192 | 192 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | 'id' => 'form-signup', |
26 | 26 | 'enableClientValidation' => true, |
27 | 27 | 'enableAjaxValidation' => false, |
28 | - 'options' => [ 'validateOnSubmit' => true ] |
|
28 | + 'options' => ['validateOnSubmit' => true] |
|
29 | 29 | ]); ?> |
30 | 30 | <?= $form->field($model, 'email', ['inputTemplate' => '<div class="input-group"><span class="input-group-addon">@</span>{input}</div>'])->input('email') ?> |
31 | 31 | <?= $form->field($model, 'password', ['inputTemplate' => '<div class="input-group">{input}<span class="input-group-btn"><button id="password-toggle" class="btn btn-default" type="button">Show</button></span></div>'])->passwordInput() ?> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | 'template' => '<div class="row"><div class="col-md-5">{image}</div><div class="col-md-6 col-md-offset-1">{input}</div></div>', |
35 | 35 | ]) ?> |
36 | 36 | <?= $form->field($model, 'send_email')->checkbox(['disabled'=>true]) ?> |
37 | - <div id='send_email_fields' <?php if(!$model->send_email) { ?>style="display: none;"<?php } ?>> |
|
37 | + <div id='send_email_fields' <?php if (!$model->send_email) { ?>style="display: none;"<?php } ?>> |
|
38 | 38 | <?= $form->field($model, 'partner_email1')->input('email') ?> |
39 | 39 | <?= $form->field($model, 'partner_email2')->input('email') ?> |
40 | 40 | <?= $form->field($model, 'partner_email3')->input('email') ?> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $plus_week = $time->alterLocalDate($actual_date, "+1 week"); |
28 | 28 | |
29 | 29 | $pie_data = []; |
30 | -if($answer_pie) { |
|
30 | +if ($answer_pie) { |
|
31 | 31 | $values = array_map('intval', array_column($answer_pie, "count")); |
32 | 32 | $labels = array_column($answer_pie, "name"); |
33 | 33 | $colors = array_column($answer_pie, "color"); |
@@ -68,15 +68,15 @@ discard block |
||
68 | 68 | </div> |
69 | 69 | </div> |
70 | 70 | |
71 | - <?php if($questions) { |
|
72 | - foreach($questions as $behavior_id => $behavior_questions) { |
|
71 | + <?php if ($questions) { |
|
72 | + foreach ($questions as $behavior_id => $behavior_questions) { |
|
73 | 73 | print "<div class='well well-sm'>"; |
74 | 74 | print "<button type='button' class='btn btn-primary' disabled='disabled'>{$behavior_questions['question']['title']}</button>"; |
75 | 75 | print "<div class='row'>"; |
76 | - foreach($behavior_questions['answers'] as $question) { |
|
76 | + foreach ($behavior_questions['answers'] as $question) { |
|
77 | 77 | print "<div class='col-md-4'>"; |
78 | 78 | print "<p><strong>{$question['title']}</strong></p>"; |
79 | - print "<p>".Html::encode($question['answer'])."</p>"; |
|
79 | + print "<p>" . Html::encode($question['answer']) . "</p>"; |
|
80 | 80 | print "</div>"; |
81 | 81 | } |
82 | 82 | print "</div></div>"; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | 'options' => ['class' => 'form-horizontal'], |
89 | 89 | ]); |
90 | 90 | |
91 | - foreach($categories as $category) { |
|
91 | + foreach ($categories as $category) { |
|
92 | 92 | $behaviors = AH::map($behaviorsList[$category['id']], 'id', 'name'); |
93 | 93 | print $form |
94 | 94 | ->field($model, "behaviors{$category['id']}") |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function signup() { |
84 | 84 | $user = $this->user->findByEmail($this->email); |
85 | - if(!$user) { |
|
85 | + if (!$user) { |
|
86 | 86 | // this is a brand new user |
87 | 87 | $this->user = $this->setFields($this->user); |
88 | 88 | $this->user->save(); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * this is a user that for whatever reason is trying to sign up again |
97 | 97 | * with the same email address. |
98 | 98 | */ |
99 | - if(!$user->isTokenConfirmed()) { |
|
99 | + if (!$user->isTokenConfirmed()) { |
|
100 | 100 | /* |
101 | 101 | * they've never verified their account. We don't care if their |
102 | 102 | * verification token is current or expired. We're resetting their |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $user->generateAuthKey(); |
125 | 125 | $user->generateVerifyEmailToken(); |
126 | 126 | |
127 | - if($user->send_email) { |
|
127 | + if ($user->send_email) { |
|
128 | 128 | $user->partner_email1 = $this->partner_email1; |
129 | 129 | $user->partner_email2 = $this->partner_email2; |
130 | 130 | $user->partner_email3 = $this->partner_email3; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | expect('getCategories should return an array of 7 categories', $this->assertEquals(count($behaviors), 7)); |
22 | 22 | |
23 | - foreach($behaviors as $behavior) { |
|
23 | + foreach ($behaviors as $behavior) { |
|
24 | 24 | expect('this behavior to have a "name" key', $this->assertArrayHasKey('name', $behavior)); |
25 | 25 | expect('this behavior to have a "behavior_count" key', $this->assertArrayHasKey('behavior_count', $behavior)); |
26 | 26 | expect('this behavior to have a "category_id" key', $this->assertArrayHasKey('category_id', $behavior)); |
@@ -17,640 +17,640 @@ |
||
17 | 17 | |
18 | 18 | private $user; |
19 | 19 | |
20 | - public $questionData = [ |
|
21 | - [ |
|
22 | - 'id' => 641, |
|
23 | - 'user_id' => 2, |
|
24 | - 'behavior_id' => 13, |
|
25 | - 'user_behavior_id' => 821, |
|
26 | - 'question' => 1, |
|
27 | - 'answer' => 'alsgn', |
|
28 | - 'date' => '2016-09-10 19:27:43', |
|
29 | - 'behavior' => |
|
30 | - [ |
|
31 | - 'id' => 13, |
|
32 | - 'name' => 'less time/energy for God, meetings, and church', |
|
33 | - 'category_id' => 2, |
|
34 | - ], |
|
35 | - ], |
|
36 | - [ |
|
37 | - 'id' => 642, |
|
38 | - 'user_id' => 2, |
|
39 | - 'behavior_id' => 13, |
|
40 | - 'user_behavior_id' => 821, |
|
41 | - 'question' => 2, |
|
42 | - 'answer' => 'loiun', |
|
43 | - 'date' => '2016-09-10 19:27:43', |
|
44 | - 'behavior' => |
|
45 | - [ |
|
46 | - 'id' => 13, |
|
47 | - 'name' => 'less time/energy for God, meetings, and church', |
|
48 | - 'category_id' => 2, |
|
49 | - ], |
|
50 | - ], |
|
51 | - [ |
|
52 | - 'id' => 643, |
|
53 | - 'user_id' => 2, |
|
54 | - 'behavior_id' => 13, |
|
55 | - 'user_behavior_id' => 821, |
|
56 | - 'question' => 3, |
|
57 | - 'answer' => 'liun', |
|
58 | - 'date' => '2016-09-10 19:27:43', |
|
59 | - 'behavior' => |
|
60 | - [ |
|
61 | - 'id' => 13, |
|
62 | - 'name' => 'less time/energy for God, meetings, and church', |
|
63 | - 'category_id' => 2, |
|
64 | - ], |
|
65 | - ], |
|
66 | - [ |
|
67 | - 'id' => 644, |
|
68 | - 'user_id' => 2, |
|
69 | - 'behavior_id' => 29, |
|
70 | - 'user_behavior_id' => 823, |
|
71 | - 'question' => 1, |
|
72 | - 'answer' => 'ljnb', |
|
73 | - 'date' => '2016-09-10 19:27:43', |
|
74 | - 'behavior' => |
|
75 | - [ |
|
76 | - 'id' => 29, |
|
77 | - 'name' => 'using profanity', |
|
78 | - 'category_id' => 3, |
|
79 | - ], |
|
80 | - ], |
|
81 | - [ |
|
82 | - 'id' => 645, |
|
83 | - 'user_id' => 2, |
|
84 | - 'behavior_id' => 29, |
|
85 | - 'user_behavior_id' => 823, |
|
86 | - 'question' => 2, |
|
87 | - 'answer' => 'liunb', |
|
88 | - 'date' => '2016-09-10 19:27:43', |
|
89 | - 'behavior' => |
|
90 | - [ |
|
91 | - 'id' => 29, |
|
92 | - 'name' => 'using profanity', |
|
93 | - 'category_id' => 3, |
|
94 | - ], |
|
95 | - ], |
|
96 | - [ |
|
97 | - 'id' => 646, |
|
98 | - 'user_id' => 2, |
|
99 | - 'behavior_id' => 29, |
|
100 | - 'user_behavior_id' => 823, |
|
101 | - 'question' => 3, |
|
102 | - 'answer' => 'ilub ', |
|
103 | - 'date' => '2016-09-10 19:27:43', |
|
104 | - 'behavior' => |
|
105 | - [ |
|
106 | - 'id' => 29, |
|
107 | - 'name' => 'using profanity', |
|
108 | - 'category_id' => 3, |
|
109 | - ], |
|
110 | - ], |
|
111 | - [ |
|
112 | - 'id' => 647, |
|
113 | - 'user_id' => 2, |
|
114 | - 'behavior_id' => 48, |
|
115 | - 'user_behavior_id' => 825, |
|
116 | - 'question' => 1, |
|
117 | - 'answer' => 'liub', |
|
118 | - 'date' => '2016-09-10 19:27:43', |
|
119 | - 'behavior' => |
|
120 | - [ |
|
121 | - 'id' => 48, |
|
122 | - 'name' => 'workaholic', |
|
123 | - 'category_id' => 4, |
|
124 | - ], |
|
125 | - ], |
|
126 | - [ |
|
127 | - 'id' => 648, |
|
128 | - 'user_id' => 2, |
|
129 | - 'behavior_id' => 48, |
|
130 | - 'user_behavior_id' => 825, |
|
131 | - 'question' => 2, |
|
132 | - 'answer' => 'liub', |
|
133 | - 'date' => '2016-09-10 19:27:43', |
|
134 | - 'behavior' => |
|
135 | - [ |
|
136 | - 'id' => 48, |
|
137 | - 'name' => 'workaholic', |
|
138 | - 'category_id' => 4, |
|
139 | - ], |
|
140 | - ], |
|
141 | - [ |
|
142 | - 'id' => 649, |
|
143 | - 'user_id' => 2, |
|
144 | - 'behavior_id' => 48, |
|
145 | - 'user_behavior_id' => 825, |
|
146 | - 'question' => 3, |
|
147 | - 'answer' => 'liub ', |
|
148 | - 'date' => '2016-09-10 19:27:43', |
|
149 | - 'behavior' => |
|
150 | - [ |
|
151 | - 'id' => 48, |
|
152 | - 'name' => 'workaholic', |
|
153 | - 'category_id' => 4, |
|
154 | - ], |
|
155 | - ], |
|
156 | - [ |
|
157 | - 'id' => 650, |
|
158 | - 'user_id' => 2, |
|
159 | - 'behavior_id' => 89, |
|
160 | - 'user_behavior_id' => 828, |
|
161 | - 'question' => 1, |
|
162 | - 'answer' => 'liub', |
|
163 | - 'date' => '2016-09-10 19:27:43', |
|
164 | - 'behavior' => |
|
165 | - [ |
|
166 | - 'id' => 89, |
|
167 | - 'name' => 'obsessive (stuck) thoughts', |
|
168 | - 'category_id' => 5, |
|
169 | - ], |
|
170 | - ], |
|
171 | - [ |
|
172 | - 'id' => 651, |
|
173 | - 'user_id' => 2, |
|
174 | - 'behavior_id' => 89, |
|
175 | - 'user_behavior_id' => 828, |
|
176 | - 'question' => 2, |
|
177 | - 'answer' => 'liuby', |
|
178 | - 'date' => '2016-09-10 19:27:43', |
|
179 | - 'behavior' => |
|
180 | - [ |
|
181 | - 'id' => 89, |
|
182 | - 'name' => 'obsessive (stuck) thoughts', |
|
183 | - 'category_id' => 5, |
|
184 | - ], |
|
185 | - ], |
|
186 | - [ |
|
187 | - 'id' => 652, |
|
188 | - 'user_id' => 2, |
|
189 | - 'behavior_id' => 89, |
|
190 | - 'user_behavior_id' => 828, |
|
191 | - 'question' => 3, |
|
192 | - 'answer' => 'uiylb', |
|
193 | - 'date' => '2016-09-10 19:27:43', |
|
194 | - 'behavior' => |
|
195 | - [ |
|
196 | - 'id' => 89, |
|
197 | - 'name' => 'obsessive (stuck) thoughts', |
|
198 | - 'category_id' => 5, |
|
199 | - ], |
|
200 | - ], |
|
201 | - [ |
|
202 | - 'id' => 653, |
|
203 | - 'user_id' => 2, |
|
204 | - 'behavior_id' => 111, |
|
205 | - 'user_behavior_id' => 829, |
|
206 | - 'question' => 1, |
|
207 | - 'answer' => 'liub', |
|
208 | - 'date' => '2016-09-10 19:27:43', |
|
209 | - 'behavior' => |
|
210 | - [ |
|
211 | - 'id' => 111, |
|
212 | - 'name' => 'seeking out old unhealthy people and places', |
|
213 | - 'category_id' => 6, |
|
214 | - ], |
|
215 | - ], |
|
216 | - [ |
|
217 | - 'id' => 654, |
|
218 | - 'user_id' => 2, |
|
219 | - 'behavior_id' => 111, |
|
220 | - 'user_behavior_id' => 829, |
|
221 | - 'question' => 2, |
|
222 | - 'answer' => 'liuyb', |
|
223 | - 'date' => '2016-09-10 19:27:43', |
|
224 | - 'behavior' => |
|
225 | - [ |
|
226 | - 'id' => 111, |
|
227 | - 'name' => 'seeking out old unhealthy people and places', |
|
228 | - 'category_id' => 6, |
|
229 | - ], |
|
230 | - ], |
|
231 | - [ |
|
232 | - 'id' => 655, |
|
233 | - 'user_id' => 2, |
|
234 | - 'behavior_id' => 111, |
|
235 | - 'user_behavior_id' => 829, |
|
236 | - 'question' => 3, |
|
237 | - 'answer' => 'iuyb', |
|
238 | - 'date' => '2016-09-10 19:27:43', |
|
239 | - 'behavior' => |
|
240 | - [ |
|
241 | - 'id' => 111, |
|
242 | - 'name' => 'seeking out old unhealthy people and places', |
|
243 | - 'category_id' => 6, |
|
244 | - ], |
|
245 | - ], |
|
246 | - [ |
|
247 | - 'id' => 656, |
|
248 | - 'user_id' => 2, |
|
249 | - 'behavior_id' => 122, |
|
250 | - 'user_behavior_id' => 831, |
|
251 | - 'question' => 1, |
|
252 | - 'answer' => 'iuyb', |
|
253 | - 'date' => '2016-09-10 19:27:43', |
|
254 | - 'behavior' => |
|
255 | - [ |
|
256 | - 'id' => 122, |
|
257 | - 'name' => 'returning to the place you swore you would never go again', |
|
258 | - 'category_id' => 7, |
|
259 | - ], |
|
260 | - ], |
|
261 | - [ |
|
262 | - 'id' => 657, |
|
263 | - 'user_id' => 2, |
|
264 | - 'behavior_id' => 122, |
|
265 | - 'user_behavior_id' => 831, |
|
266 | - 'question' => 2, |
|
267 | - 'answer' => 'iuyb', |
|
268 | - 'date' => '2016-09-10 19:27:43', |
|
269 | - 'behavior' => |
|
270 | - [ |
|
271 | - 'id' => 122, |
|
272 | - 'name' => 'returning to the place you swore you would never go again', |
|
273 | - 'category_id' => 7, |
|
274 | - ], |
|
275 | - ], |
|
276 | - [ |
|
277 | - 'id' => 658, |
|
278 | - 'user_id' => 2, |
|
279 | - 'behavior_id' => 122, |
|
280 | - 'user_behavior_id' => 831, |
|
281 | - 'question' => 3, |
|
282 | - 'answer' => 'liuyb', |
|
283 | - 'date' => '2016-09-10 19:27:43', |
|
284 | - 'behavior' => |
|
285 | - [ |
|
286 | - 'id' => 122, |
|
287 | - 'name' => 'returning to the place you swore you would never go again', |
|
288 | - 'category_id' => 7, |
|
289 | - ], |
|
290 | - ], |
|
20 | + public $questionData = [ |
|
21 | + [ |
|
22 | + 'id' => 641, |
|
23 | + 'user_id' => 2, |
|
24 | + 'behavior_id' => 13, |
|
25 | + 'user_behavior_id' => 821, |
|
26 | + 'question' => 1, |
|
27 | + 'answer' => 'alsgn', |
|
28 | + 'date' => '2016-09-10 19:27:43', |
|
29 | + 'behavior' => |
|
30 | + [ |
|
31 | + 'id' => 13, |
|
32 | + 'name' => 'less time/energy for God, meetings, and church', |
|
33 | + 'category_id' => 2, |
|
34 | + ], |
|
35 | + ], |
|
36 | + [ |
|
37 | + 'id' => 642, |
|
38 | + 'user_id' => 2, |
|
39 | + 'behavior_id' => 13, |
|
40 | + 'user_behavior_id' => 821, |
|
41 | + 'question' => 2, |
|
42 | + 'answer' => 'loiun', |
|
43 | + 'date' => '2016-09-10 19:27:43', |
|
44 | + 'behavior' => |
|
45 | + [ |
|
46 | + 'id' => 13, |
|
47 | + 'name' => 'less time/energy for God, meetings, and church', |
|
48 | + 'category_id' => 2, |
|
49 | + ], |
|
50 | + ], |
|
51 | + [ |
|
52 | + 'id' => 643, |
|
53 | + 'user_id' => 2, |
|
54 | + 'behavior_id' => 13, |
|
55 | + 'user_behavior_id' => 821, |
|
56 | + 'question' => 3, |
|
57 | + 'answer' => 'liun', |
|
58 | + 'date' => '2016-09-10 19:27:43', |
|
59 | + 'behavior' => |
|
60 | + [ |
|
61 | + 'id' => 13, |
|
62 | + 'name' => 'less time/energy for God, meetings, and church', |
|
63 | + 'category_id' => 2, |
|
64 | + ], |
|
65 | + ], |
|
66 | + [ |
|
67 | + 'id' => 644, |
|
68 | + 'user_id' => 2, |
|
69 | + 'behavior_id' => 29, |
|
70 | + 'user_behavior_id' => 823, |
|
71 | + 'question' => 1, |
|
72 | + 'answer' => 'ljnb', |
|
73 | + 'date' => '2016-09-10 19:27:43', |
|
74 | + 'behavior' => |
|
75 | + [ |
|
76 | + 'id' => 29, |
|
77 | + 'name' => 'using profanity', |
|
78 | + 'category_id' => 3, |
|
79 | + ], |
|
80 | + ], |
|
81 | + [ |
|
82 | + 'id' => 645, |
|
83 | + 'user_id' => 2, |
|
84 | + 'behavior_id' => 29, |
|
85 | + 'user_behavior_id' => 823, |
|
86 | + 'question' => 2, |
|
87 | + 'answer' => 'liunb', |
|
88 | + 'date' => '2016-09-10 19:27:43', |
|
89 | + 'behavior' => |
|
90 | + [ |
|
91 | + 'id' => 29, |
|
92 | + 'name' => 'using profanity', |
|
93 | + 'category_id' => 3, |
|
94 | + ], |
|
95 | + ], |
|
96 | + [ |
|
97 | + 'id' => 646, |
|
98 | + 'user_id' => 2, |
|
99 | + 'behavior_id' => 29, |
|
100 | + 'user_behavior_id' => 823, |
|
101 | + 'question' => 3, |
|
102 | + 'answer' => 'ilub ', |
|
103 | + 'date' => '2016-09-10 19:27:43', |
|
104 | + 'behavior' => |
|
105 | + [ |
|
106 | + 'id' => 29, |
|
107 | + 'name' => 'using profanity', |
|
108 | + 'category_id' => 3, |
|
109 | + ], |
|
110 | + ], |
|
111 | + [ |
|
112 | + 'id' => 647, |
|
113 | + 'user_id' => 2, |
|
114 | + 'behavior_id' => 48, |
|
115 | + 'user_behavior_id' => 825, |
|
116 | + 'question' => 1, |
|
117 | + 'answer' => 'liub', |
|
118 | + 'date' => '2016-09-10 19:27:43', |
|
119 | + 'behavior' => |
|
120 | + [ |
|
121 | + 'id' => 48, |
|
122 | + 'name' => 'workaholic', |
|
123 | + 'category_id' => 4, |
|
124 | + ], |
|
125 | + ], |
|
126 | + [ |
|
127 | + 'id' => 648, |
|
128 | + 'user_id' => 2, |
|
129 | + 'behavior_id' => 48, |
|
130 | + 'user_behavior_id' => 825, |
|
131 | + 'question' => 2, |
|
132 | + 'answer' => 'liub', |
|
133 | + 'date' => '2016-09-10 19:27:43', |
|
134 | + 'behavior' => |
|
135 | + [ |
|
136 | + 'id' => 48, |
|
137 | + 'name' => 'workaholic', |
|
138 | + 'category_id' => 4, |
|
139 | + ], |
|
140 | + ], |
|
141 | + [ |
|
142 | + 'id' => 649, |
|
143 | + 'user_id' => 2, |
|
144 | + 'behavior_id' => 48, |
|
145 | + 'user_behavior_id' => 825, |
|
146 | + 'question' => 3, |
|
147 | + 'answer' => 'liub ', |
|
148 | + 'date' => '2016-09-10 19:27:43', |
|
149 | + 'behavior' => |
|
150 | + [ |
|
151 | + 'id' => 48, |
|
152 | + 'name' => 'workaholic', |
|
153 | + 'category_id' => 4, |
|
154 | + ], |
|
155 | + ], |
|
156 | + [ |
|
157 | + 'id' => 650, |
|
158 | + 'user_id' => 2, |
|
159 | + 'behavior_id' => 89, |
|
160 | + 'user_behavior_id' => 828, |
|
161 | + 'question' => 1, |
|
162 | + 'answer' => 'liub', |
|
163 | + 'date' => '2016-09-10 19:27:43', |
|
164 | + 'behavior' => |
|
165 | + [ |
|
166 | + 'id' => 89, |
|
167 | + 'name' => 'obsessive (stuck) thoughts', |
|
168 | + 'category_id' => 5, |
|
169 | + ], |
|
170 | + ], |
|
171 | + [ |
|
172 | + 'id' => 651, |
|
173 | + 'user_id' => 2, |
|
174 | + 'behavior_id' => 89, |
|
175 | + 'user_behavior_id' => 828, |
|
176 | + 'question' => 2, |
|
177 | + 'answer' => 'liuby', |
|
178 | + 'date' => '2016-09-10 19:27:43', |
|
179 | + 'behavior' => |
|
180 | + [ |
|
181 | + 'id' => 89, |
|
182 | + 'name' => 'obsessive (stuck) thoughts', |
|
183 | + 'category_id' => 5, |
|
184 | + ], |
|
185 | + ], |
|
186 | + [ |
|
187 | + 'id' => 652, |
|
188 | + 'user_id' => 2, |
|
189 | + 'behavior_id' => 89, |
|
190 | + 'user_behavior_id' => 828, |
|
191 | + 'question' => 3, |
|
192 | + 'answer' => 'uiylb', |
|
193 | + 'date' => '2016-09-10 19:27:43', |
|
194 | + 'behavior' => |
|
195 | + [ |
|
196 | + 'id' => 89, |
|
197 | + 'name' => 'obsessive (stuck) thoughts', |
|
198 | + 'category_id' => 5, |
|
199 | + ], |
|
200 | + ], |
|
201 | + [ |
|
202 | + 'id' => 653, |
|
203 | + 'user_id' => 2, |
|
204 | + 'behavior_id' => 111, |
|
205 | + 'user_behavior_id' => 829, |
|
206 | + 'question' => 1, |
|
207 | + 'answer' => 'liub', |
|
208 | + 'date' => '2016-09-10 19:27:43', |
|
209 | + 'behavior' => |
|
210 | + [ |
|
211 | + 'id' => 111, |
|
212 | + 'name' => 'seeking out old unhealthy people and places', |
|
213 | + 'category_id' => 6, |
|
214 | + ], |
|
215 | + ], |
|
216 | + [ |
|
217 | + 'id' => 654, |
|
218 | + 'user_id' => 2, |
|
219 | + 'behavior_id' => 111, |
|
220 | + 'user_behavior_id' => 829, |
|
221 | + 'question' => 2, |
|
222 | + 'answer' => 'liuyb', |
|
223 | + 'date' => '2016-09-10 19:27:43', |
|
224 | + 'behavior' => |
|
225 | + [ |
|
226 | + 'id' => 111, |
|
227 | + 'name' => 'seeking out old unhealthy people and places', |
|
228 | + 'category_id' => 6, |
|
229 | + ], |
|
230 | + ], |
|
231 | + [ |
|
232 | + 'id' => 655, |
|
233 | + 'user_id' => 2, |
|
234 | + 'behavior_id' => 111, |
|
235 | + 'user_behavior_id' => 829, |
|
236 | + 'question' => 3, |
|
237 | + 'answer' => 'iuyb', |
|
238 | + 'date' => '2016-09-10 19:27:43', |
|
239 | + 'behavior' => |
|
240 | + [ |
|
241 | + 'id' => 111, |
|
242 | + 'name' => 'seeking out old unhealthy people and places', |
|
243 | + 'category_id' => 6, |
|
244 | + ], |
|
245 | + ], |
|
246 | + [ |
|
247 | + 'id' => 656, |
|
248 | + 'user_id' => 2, |
|
249 | + 'behavior_id' => 122, |
|
250 | + 'user_behavior_id' => 831, |
|
251 | + 'question' => 1, |
|
252 | + 'answer' => 'iuyb', |
|
253 | + 'date' => '2016-09-10 19:27:43', |
|
254 | + 'behavior' => |
|
255 | + [ |
|
256 | + 'id' => 122, |
|
257 | + 'name' => 'returning to the place you swore you would never go again', |
|
258 | + 'category_id' => 7, |
|
259 | + ], |
|
260 | + ], |
|
261 | + [ |
|
262 | + 'id' => 657, |
|
263 | + 'user_id' => 2, |
|
264 | + 'behavior_id' => 122, |
|
265 | + 'user_behavior_id' => 831, |
|
266 | + 'question' => 2, |
|
267 | + 'answer' => 'iuyb', |
|
268 | + 'date' => '2016-09-10 19:27:43', |
|
269 | + 'behavior' => |
|
270 | + [ |
|
271 | + 'id' => 122, |
|
272 | + 'name' => 'returning to the place you swore you would never go again', |
|
273 | + 'category_id' => 7, |
|
274 | + ], |
|
275 | + ], |
|
276 | + [ |
|
277 | + 'id' => 658, |
|
278 | + 'user_id' => 2, |
|
279 | + 'behavior_id' => 122, |
|
280 | + 'user_behavior_id' => 831, |
|
281 | + 'question' => 3, |
|
282 | + 'answer' => 'liuyb', |
|
283 | + 'date' => '2016-09-10 19:27:43', |
|
284 | + 'behavior' => |
|
285 | + [ |
|
286 | + 'id' => 122, |
|
287 | + 'name' => 'returning to the place you swore you would never go again', |
|
288 | + 'category_id' => 7, |
|
289 | + ], |
|
290 | + ], |
|
291 | 291 | ]; |
292 | 292 | public $userQuestions = [ |
293 | - 13 => [ |
|
294 | - 'question' => [ |
|
295 | - 'id' => 13, |
|
296 | - 'title' => 'less time/energy for God, meetings, and church', |
|
297 | - ], |
|
298 | - 'answers' => [ |
|
299 | - [ |
|
300 | - 'title' => 'How does it affect me? How do I act and feel?', |
|
301 | - 'answer' => 'alsgn', |
|
302 | - ], [ |
|
303 | - 'title' => 'How does it affect the important people in my life?', |
|
304 | - 'answer' => 'loiun', |
|
305 | - ], [ |
|
306 | - 'title' => 'Why do I do this? What is the benefit for me?', |
|
307 | - 'answer' => 'liun', |
|
308 | - ], |
|
309 | - ], |
|
310 | - ], |
|
311 | - 29 => [ |
|
312 | - 'question' => [ |
|
313 | - 'id' => 29, |
|
314 | - 'title' => 'using profanity', |
|
315 | - ], |
|
316 | - 'answers' => [ |
|
317 | - [ |
|
318 | - 'title' => 'How does it affect me? How do I act and feel?', |
|
319 | - 'answer' => 'ljnb', |
|
320 | - ], [ |
|
321 | - 'title' => 'How does it affect the important people in my life?', |
|
322 | - 'answer' => 'liunb', |
|
323 | - ], [ |
|
324 | - 'title' => 'Why do I do this? What is the benefit for me?', |
|
325 | - 'answer' => 'ilub ', |
|
326 | - ], |
|
327 | - ], |
|
328 | - ], |
|
329 | - 48 => [ |
|
330 | - 'question' => [ |
|
331 | - 'id' => 48, |
|
332 | - 'title' => 'workaholic', |
|
333 | - ], |
|
334 | - 'answers' => [ |
|
335 | - [ |
|
336 | - 'title' => 'How does it affect me? How do I act and feel?', |
|
337 | - 'answer' => 'liub', |
|
338 | - ], [ |
|
339 | - 'title' => 'How does it affect the important people in my life?', |
|
340 | - 'answer' => 'liub', |
|
341 | - ], [ |
|
342 | - 'title' => 'Why do I do this? What is the benefit for me?', |
|
343 | - 'answer' => 'liub ', |
|
344 | - ], |
|
345 | - ], |
|
346 | - ], |
|
347 | - 89 => [ |
|
348 | - 'question' => [ |
|
349 | - 'id' => 89, |
|
350 | - 'title' => 'obsessive (stuck) thoughts', |
|
351 | - ], |
|
352 | - 'answers' => [ |
|
353 | - [ |
|
354 | - 'title' => 'How does it affect me? How do I act and feel?', |
|
355 | - 'answer' => 'liub', |
|
356 | - ], [ |
|
357 | - 'title' => 'How does it affect the important people in my life?', |
|
358 | - 'answer' => 'liuby', |
|
359 | - ], [ |
|
360 | - 'title' => 'Why do I do this? What is the benefit for me?', |
|
361 | - 'answer' => 'uiylb', |
|
362 | - ], |
|
363 | - ], |
|
364 | - ], |
|
365 | - 111 => [ |
|
366 | - 'question' => [ |
|
367 | - 'id' => 111, |
|
368 | - 'title' => 'seeking out old unhealthy people and places', |
|
369 | - ], |
|
370 | - 'answers' => [ |
|
371 | - [ |
|
372 | - 'title' => 'How does it affect me? How do I act and feel?', |
|
373 | - 'answer' => 'liub', |
|
374 | - ], [ |
|
375 | - 'title' => 'How does it affect the important people in my life?', |
|
376 | - 'answer' => 'liuyb', |
|
377 | - ], [ |
|
378 | - 'title' => 'Why do I do this? What is the benefit for me?', |
|
379 | - 'answer' => 'iuyb', |
|
380 | - ], |
|
381 | - ], |
|
382 | - ], |
|
383 | - 122 => [ |
|
384 | - 'question' => [ |
|
385 | - 'id' => 122, |
|
386 | - 'title' => 'returning to the place you swore you would never go again', |
|
387 | - ], |
|
388 | - 'answers' => [ |
|
389 | - [ |
|
390 | - 'title' => 'How does it affect me? How do I act and feel?', |
|
391 | - 'answer' => 'iuyb', |
|
392 | - ], [ |
|
393 | - 'title' => 'How does it affect the important people in my life?', |
|
394 | - 'answer' => 'iuyb', |
|
395 | - ], [ |
|
396 | - 'title' => 'Why do I do this? What is the benefit for me?', |
|
397 | - 'answer' => 'liuyb', |
|
398 | - ], |
|
399 | - ], |
|
400 | - ], |
|
293 | + 13 => [ |
|
294 | + 'question' => [ |
|
295 | + 'id' => 13, |
|
296 | + 'title' => 'less time/energy for God, meetings, and church', |
|
297 | + ], |
|
298 | + 'answers' => [ |
|
299 | + [ |
|
300 | + 'title' => 'How does it affect me? How do I act and feel?', |
|
301 | + 'answer' => 'alsgn', |
|
302 | + ], [ |
|
303 | + 'title' => 'How does it affect the important people in my life?', |
|
304 | + 'answer' => 'loiun', |
|
305 | + ], [ |
|
306 | + 'title' => 'Why do I do this? What is the benefit for me?', |
|
307 | + 'answer' => 'liun', |
|
308 | + ], |
|
309 | + ], |
|
310 | + ], |
|
311 | + 29 => [ |
|
312 | + 'question' => [ |
|
313 | + 'id' => 29, |
|
314 | + 'title' => 'using profanity', |
|
315 | + ], |
|
316 | + 'answers' => [ |
|
317 | + [ |
|
318 | + 'title' => 'How does it affect me? How do I act and feel?', |
|
319 | + 'answer' => 'ljnb', |
|
320 | + ], [ |
|
321 | + 'title' => 'How does it affect the important people in my life?', |
|
322 | + 'answer' => 'liunb', |
|
323 | + ], [ |
|
324 | + 'title' => 'Why do I do this? What is the benefit for me?', |
|
325 | + 'answer' => 'ilub ', |
|
326 | + ], |
|
327 | + ], |
|
328 | + ], |
|
329 | + 48 => [ |
|
330 | + 'question' => [ |
|
331 | + 'id' => 48, |
|
332 | + 'title' => 'workaholic', |
|
333 | + ], |
|
334 | + 'answers' => [ |
|
335 | + [ |
|
336 | + 'title' => 'How does it affect me? How do I act and feel?', |
|
337 | + 'answer' => 'liub', |
|
338 | + ], [ |
|
339 | + 'title' => 'How does it affect the important people in my life?', |
|
340 | + 'answer' => 'liub', |
|
341 | + ], [ |
|
342 | + 'title' => 'Why do I do this? What is the benefit for me?', |
|
343 | + 'answer' => 'liub ', |
|
344 | + ], |
|
345 | + ], |
|
346 | + ], |
|
347 | + 89 => [ |
|
348 | + 'question' => [ |
|
349 | + 'id' => 89, |
|
350 | + 'title' => 'obsessive (stuck) thoughts', |
|
351 | + ], |
|
352 | + 'answers' => [ |
|
353 | + [ |
|
354 | + 'title' => 'How does it affect me? How do I act and feel?', |
|
355 | + 'answer' => 'liub', |
|
356 | + ], [ |
|
357 | + 'title' => 'How does it affect the important people in my life?', |
|
358 | + 'answer' => 'liuby', |
|
359 | + ], [ |
|
360 | + 'title' => 'Why do I do this? What is the benefit for me?', |
|
361 | + 'answer' => 'uiylb', |
|
362 | + ], |
|
363 | + ], |
|
364 | + ], |
|
365 | + 111 => [ |
|
366 | + 'question' => [ |
|
367 | + 'id' => 111, |
|
368 | + 'title' => 'seeking out old unhealthy people and places', |
|
369 | + ], |
|
370 | + 'answers' => [ |
|
371 | + [ |
|
372 | + 'title' => 'How does it affect me? How do I act and feel?', |
|
373 | + 'answer' => 'liub', |
|
374 | + ], [ |
|
375 | + 'title' => 'How does it affect the important people in my life?', |
|
376 | + 'answer' => 'liuyb', |
|
377 | + ], [ |
|
378 | + 'title' => 'Why do I do this? What is the benefit for me?', |
|
379 | + 'answer' => 'iuyb', |
|
380 | + ], |
|
381 | + ], |
|
382 | + ], |
|
383 | + 122 => [ |
|
384 | + 'question' => [ |
|
385 | + 'id' => 122, |
|
386 | + 'title' => 'returning to the place you swore you would never go again', |
|
387 | + ], |
|
388 | + 'answers' => [ |
|
389 | + [ |
|
390 | + 'title' => 'How does it affect me? How do I act and feel?', |
|
391 | + 'answer' => 'iuyb', |
|
392 | + ], [ |
|
393 | + 'title' => 'How does it affect the important people in my life?', |
|
394 | + 'answer' => 'iuyb', |
|
395 | + ], [ |
|
396 | + 'title' => 'Why do I do this? What is the benefit for me?', |
|
397 | + 'answer' => 'liuyb', |
|
398 | + ], |
|
399 | + ], |
|
400 | + ], |
|
401 | 401 | ]; |
402 | 402 | |
403 | 403 | public $behaviorData = [ |
404 | - [ |
|
405 | - 'id' => 820, |
|
406 | - 'user_id' => 2, |
|
407 | - 'behavior_id' => 7, |
|
408 | - 'date' => '2016-09-10 19:26:04', |
|
409 | - 'behavior' => [ |
|
410 | - 'id' => 7, |
|
411 | - 'name' => 'making eye contact', |
|
412 | - 'category_id' => 1, |
|
413 | - 'category' => [ |
|
414 | - 'id' => 1, |
|
415 | - 'name' => 'Restoration', |
|
416 | - ], |
|
417 | - ], |
|
418 | - ], [ |
|
419 | - 'id' => 821, |
|
420 | - 'user_id' => 2, |
|
421 | - 'behavior_id' => 13, |
|
422 | - 'date' => '2016-09-10 19:26:04', |
|
423 | - 'behavior' => [ |
|
424 | - 'id' => 13, |
|
425 | - 'name' => 'less time/energy for God, meetings, and church', |
|
426 | - 'category_id' => 2, |
|
427 | - 'category' => [ |
|
428 | - 'id' => 2, |
|
429 | - 'name' => 'Forgetting Priorities', |
|
430 | - ], |
|
431 | - ], |
|
432 | - ], [ |
|
433 | - 'id' => 822, |
|
434 | - 'user_id' => 2, |
|
435 | - 'behavior_id' => 18, |
|
436 | - 'date' => '2016-09-10 19:26:04', |
|
437 | - 'behavior' => [ |
|
438 | - 'id' => 18, |
|
439 | - 'name' => 'changes in goals', |
|
440 | - 'category_id' => 2, |
|
441 | - 'category' => [ |
|
442 | - 'id' => 2, |
|
443 | - 'name' => 'Forgetting Priorities', |
|
444 | - ], |
|
445 | - ], |
|
446 | - ], [ |
|
447 | - 'id' => 823, |
|
448 | - 'user_id' => 2, |
|
449 | - 'behavior_id' => 29, |
|
450 | - 'date' => '2016-09-10 19:26:04', |
|
451 | - 'behavior' => [ |
|
452 | - 'id' => 29, |
|
453 | - 'name' => 'using profanity', |
|
454 | - 'category_id' => 3, |
|
455 | - 'category' => [ |
|
456 | - 'id' => 3, |
|
457 | - 'name' => 'Anxiety', |
|
458 | - ], |
|
459 | - ], |
|
460 | - ], [ |
|
461 | - 'id' => 824, |
|
462 | - 'user_id' => 2, |
|
463 | - 'behavior_id' => 41, |
|
464 | - 'date' => '2016-09-10 19:26:04', |
|
465 | - 'behavior' => [ |
|
466 | - 'id' => 41, |
|
467 | - 'name' => 'co-dependent rescuing', |
|
468 | - 'category_id' => 3, |
|
469 | - 'category' => [ |
|
470 | - 'id' => 3, |
|
471 | - 'name' => 'Anxiety', |
|
472 | - ], |
|
473 | - ], |
|
474 | - ], [ |
|
475 | - 'id' => 825, |
|
476 | - 'user_id' => 2, |
|
477 | - 'behavior_id' => 48, |
|
478 | - 'date' => '2016-09-10 19:26:04', |
|
479 | - 'behavior' => [ |
|
480 | - 'id' => 48, |
|
481 | - 'name' => 'workaholic', |
|
482 | - 'category_id' => 4, |
|
483 | - 'category' => [ |
|
484 | - 'id' => 4, |
|
485 | - 'name' => 'Speeding Up', |
|
486 | - ], |
|
487 | - ], |
|
488 | - ], [ |
|
489 | - 'id' => 826, |
|
490 | - 'user_id' => 2, |
|
491 | - 'behavior_id' => 72, |
|
492 | - 'date' => '2016-09-10 19:26:04', |
|
493 | - 'behavior' => [ |
|
494 | - 'id' => 72, |
|
495 | - 'name' => 'black and white, all or nothing thinking', |
|
496 | - 'category_id' => 5, |
|
497 | - 'category' => [ |
|
498 | - 'id' => 5, |
|
499 | - 'name' => 'Ticked Off', |
|
500 | - ], |
|
501 | - ], |
|
502 | - ], [ |
|
503 | - 'id' => 827, |
|
504 | - 'user_id' => 2, |
|
505 | - 'behavior_id' => 79, |
|
506 | - 'date' => '2016-09-10 19:26:04', |
|
507 | - 'behavior' => [ |
|
508 | - 'id' => 79, |
|
509 | - 'name' => 'blaming', |
|
510 | - 'category_id' => 5, |
|
511 | - 'category' => [ |
|
512 | - 'id' => 5, |
|
513 | - 'name' => 'Ticked Off', |
|
514 | - ], |
|
515 | - ], |
|
516 | - ], [ |
|
517 | - 'id' => 828, |
|
518 | - 'user_id' => 2, |
|
519 | - 'behavior_id' => 89, |
|
520 | - 'date' => '2016-09-10 19:26:04', |
|
521 | - 'behavior' => [ |
|
522 | - 'id' => 89, |
|
523 | - 'name' => 'obsessive (stuck) thoughts', |
|
524 | - 'category_id' => 5, |
|
525 | - 'category' => [ |
|
526 | - 'id' => 5, |
|
527 | - 'name' => 'Ticked Off', |
|
528 | - ], |
|
529 | - ], |
|
530 | - ], [ |
|
531 | - 'id' => 829, |
|
532 | - 'user_id' => 2, |
|
533 | - 'behavior_id' => 111, |
|
534 | - 'date' => '2016-09-10 19:26:04', |
|
535 | - 'behavior' => [ |
|
536 | - 'id' => 111, |
|
537 | - 'name' => 'seeking out old unhealthy people and places', |
|
538 | - 'category_id' => 6, |
|
539 | - 'category' => [ |
|
540 | - 'id' => 6, |
|
541 | - 'name' => 'Exhausted', |
|
542 | - ], |
|
543 | - ], |
|
544 | - ], [ |
|
545 | - 'id' => 830, |
|
546 | - 'user_id' => 2, |
|
547 | - 'behavior_id' => 118, |
|
548 | - 'date' => '2016-09-10 19:26:04', |
|
549 | - 'behavior' => [ |
|
550 | - 'id' => 118, |
|
551 | - 'name' => 'not returning phone calls', |
|
552 | - 'category_id' => 6, |
|
553 | - 'category' => [ |
|
554 | - 'id' => 6, |
|
555 | - 'name' => 'Exhausted', |
|
556 | - ], |
|
557 | - ], |
|
558 | - ], [ |
|
559 | - 'id' => 831, |
|
560 | - 'user_id' => 2, |
|
561 | - 'behavior_id' => 122, |
|
562 | - 'date' => '2016-09-10 19:26:04', |
|
563 | - 'behavior' => [ |
|
564 | - 'id' => 122, |
|
565 | - 'name' => 'returning to the place you swore you would never go again', |
|
566 | - 'category_id' => 7, |
|
567 | - 'category' => [ |
|
568 | - 'id' => 7, |
|
569 | - 'name' => 'Relapse/Moral Failure', |
|
570 | - ], |
|
571 | - ], |
|
572 | - ], |
|
404 | + [ |
|
405 | + 'id' => 820, |
|
406 | + 'user_id' => 2, |
|
407 | + 'behavior_id' => 7, |
|
408 | + 'date' => '2016-09-10 19:26:04', |
|
409 | + 'behavior' => [ |
|
410 | + 'id' => 7, |
|
411 | + 'name' => 'making eye contact', |
|
412 | + 'category_id' => 1, |
|
413 | + 'category' => [ |
|
414 | + 'id' => 1, |
|
415 | + 'name' => 'Restoration', |
|
416 | + ], |
|
417 | + ], |
|
418 | + ], [ |
|
419 | + 'id' => 821, |
|
420 | + 'user_id' => 2, |
|
421 | + 'behavior_id' => 13, |
|
422 | + 'date' => '2016-09-10 19:26:04', |
|
423 | + 'behavior' => [ |
|
424 | + 'id' => 13, |
|
425 | + 'name' => 'less time/energy for God, meetings, and church', |
|
426 | + 'category_id' => 2, |
|
427 | + 'category' => [ |
|
428 | + 'id' => 2, |
|
429 | + 'name' => 'Forgetting Priorities', |
|
430 | + ], |
|
431 | + ], |
|
432 | + ], [ |
|
433 | + 'id' => 822, |
|
434 | + 'user_id' => 2, |
|
435 | + 'behavior_id' => 18, |
|
436 | + 'date' => '2016-09-10 19:26:04', |
|
437 | + 'behavior' => [ |
|
438 | + 'id' => 18, |
|
439 | + 'name' => 'changes in goals', |
|
440 | + 'category_id' => 2, |
|
441 | + 'category' => [ |
|
442 | + 'id' => 2, |
|
443 | + 'name' => 'Forgetting Priorities', |
|
444 | + ], |
|
445 | + ], |
|
446 | + ], [ |
|
447 | + 'id' => 823, |
|
448 | + 'user_id' => 2, |
|
449 | + 'behavior_id' => 29, |
|
450 | + 'date' => '2016-09-10 19:26:04', |
|
451 | + 'behavior' => [ |
|
452 | + 'id' => 29, |
|
453 | + 'name' => 'using profanity', |
|
454 | + 'category_id' => 3, |
|
455 | + 'category' => [ |
|
456 | + 'id' => 3, |
|
457 | + 'name' => 'Anxiety', |
|
458 | + ], |
|
459 | + ], |
|
460 | + ], [ |
|
461 | + 'id' => 824, |
|
462 | + 'user_id' => 2, |
|
463 | + 'behavior_id' => 41, |
|
464 | + 'date' => '2016-09-10 19:26:04', |
|
465 | + 'behavior' => [ |
|
466 | + 'id' => 41, |
|
467 | + 'name' => 'co-dependent rescuing', |
|
468 | + 'category_id' => 3, |
|
469 | + 'category' => [ |
|
470 | + 'id' => 3, |
|
471 | + 'name' => 'Anxiety', |
|
472 | + ], |
|
473 | + ], |
|
474 | + ], [ |
|
475 | + 'id' => 825, |
|
476 | + 'user_id' => 2, |
|
477 | + 'behavior_id' => 48, |
|
478 | + 'date' => '2016-09-10 19:26:04', |
|
479 | + 'behavior' => [ |
|
480 | + 'id' => 48, |
|
481 | + 'name' => 'workaholic', |
|
482 | + 'category_id' => 4, |
|
483 | + 'category' => [ |
|
484 | + 'id' => 4, |
|
485 | + 'name' => 'Speeding Up', |
|
486 | + ], |
|
487 | + ], |
|
488 | + ], [ |
|
489 | + 'id' => 826, |
|
490 | + 'user_id' => 2, |
|
491 | + 'behavior_id' => 72, |
|
492 | + 'date' => '2016-09-10 19:26:04', |
|
493 | + 'behavior' => [ |
|
494 | + 'id' => 72, |
|
495 | + 'name' => 'black and white, all or nothing thinking', |
|
496 | + 'category_id' => 5, |
|
497 | + 'category' => [ |
|
498 | + 'id' => 5, |
|
499 | + 'name' => 'Ticked Off', |
|
500 | + ], |
|
501 | + ], |
|
502 | + ], [ |
|
503 | + 'id' => 827, |
|
504 | + 'user_id' => 2, |
|
505 | + 'behavior_id' => 79, |
|
506 | + 'date' => '2016-09-10 19:26:04', |
|
507 | + 'behavior' => [ |
|
508 | + 'id' => 79, |
|
509 | + 'name' => 'blaming', |
|
510 | + 'category_id' => 5, |
|
511 | + 'category' => [ |
|
512 | + 'id' => 5, |
|
513 | + 'name' => 'Ticked Off', |
|
514 | + ], |
|
515 | + ], |
|
516 | + ], [ |
|
517 | + 'id' => 828, |
|
518 | + 'user_id' => 2, |
|
519 | + 'behavior_id' => 89, |
|
520 | + 'date' => '2016-09-10 19:26:04', |
|
521 | + 'behavior' => [ |
|
522 | + 'id' => 89, |
|
523 | + 'name' => 'obsessive (stuck) thoughts', |
|
524 | + 'category_id' => 5, |
|
525 | + 'category' => [ |
|
526 | + 'id' => 5, |
|
527 | + 'name' => 'Ticked Off', |
|
528 | + ], |
|
529 | + ], |
|
530 | + ], [ |
|
531 | + 'id' => 829, |
|
532 | + 'user_id' => 2, |
|
533 | + 'behavior_id' => 111, |
|
534 | + 'date' => '2016-09-10 19:26:04', |
|
535 | + 'behavior' => [ |
|
536 | + 'id' => 111, |
|
537 | + 'name' => 'seeking out old unhealthy people and places', |
|
538 | + 'category_id' => 6, |
|
539 | + 'category' => [ |
|
540 | + 'id' => 6, |
|
541 | + 'name' => 'Exhausted', |
|
542 | + ], |
|
543 | + ], |
|
544 | + ], [ |
|
545 | + 'id' => 830, |
|
546 | + 'user_id' => 2, |
|
547 | + 'behavior_id' => 118, |
|
548 | + 'date' => '2016-09-10 19:26:04', |
|
549 | + 'behavior' => [ |
|
550 | + 'id' => 118, |
|
551 | + 'name' => 'not returning phone calls', |
|
552 | + 'category_id' => 6, |
|
553 | + 'category' => [ |
|
554 | + 'id' => 6, |
|
555 | + 'name' => 'Exhausted', |
|
556 | + ], |
|
557 | + ], |
|
558 | + ], [ |
|
559 | + 'id' => 831, |
|
560 | + 'user_id' => 2, |
|
561 | + 'behavior_id' => 122, |
|
562 | + 'date' => '2016-09-10 19:26:04', |
|
563 | + 'behavior' => [ |
|
564 | + 'id' => 122, |
|
565 | + 'name' => 'returning to the place you swore you would never go again', |
|
566 | + 'category_id' => 7, |
|
567 | + 'category' => [ |
|
568 | + 'id' => 7, |
|
569 | + 'name' => 'Relapse/Moral Failure', |
|
570 | + ], |
|
571 | + ], |
|
572 | + ], |
|
573 | 573 | ]; |
574 | 574 | |
575 | 575 | public $userBehaviors = [ |
576 | - 1 => [ |
|
577 | - 'category_name' => 'Restoration', |
|
578 | - 'behaviors' => [ |
|
579 | - [ |
|
580 | - 'id' => 7, |
|
581 | - 'name' => 'making eye contact', |
|
582 | - ], |
|
583 | - ], |
|
584 | - ], |
|
585 | - 2 => [ |
|
586 | - 'category_name' => 'Forgetting Priorities', |
|
587 | - 'behaviors' => [ |
|
588 | - [ |
|
589 | - 'id' => 13, |
|
590 | - 'name' => 'less time/energy for God, meetings, and church', |
|
591 | - ], [ |
|
592 | - 'id' => 18, |
|
593 | - 'name' => 'changes in goals', |
|
594 | - ], |
|
595 | - ], |
|
576 | + 1 => [ |
|
577 | + 'category_name' => 'Restoration', |
|
578 | + 'behaviors' => [ |
|
579 | + [ |
|
580 | + 'id' => 7, |
|
581 | + 'name' => 'making eye contact', |
|
582 | + ], |
|
583 | + ], |
|
584 | + ], |
|
585 | + 2 => [ |
|
586 | + 'category_name' => 'Forgetting Priorities', |
|
587 | + 'behaviors' => [ |
|
588 | + [ |
|
589 | + 'id' => 13, |
|
590 | + 'name' => 'less time/energy for God, meetings, and church', |
|
591 | + ], [ |
|
592 | + 'id' => 18, |
|
593 | + 'name' => 'changes in goals', |
|
594 | + ], |
|
595 | + ], |
|
596 | 596 | ], |
597 | 597 | 3 => [ |
598 | - 'category_name' => 'Anxiety', |
|
599 | - 'behaviors' => [ |
|
600 | - [ |
|
601 | - 'id' => 29, |
|
602 | - 'name' => 'using profanity', |
|
603 | - ], [ |
|
604 | - 'id' => 41, |
|
605 | - 'name' => 'co-dependent rescuing', |
|
606 | - ], |
|
607 | - ], |
|
608 | - ], |
|
609 | - 4 => [ |
|
610 | - 'category_name' => 'Speeding Up', |
|
611 | - 'behaviors' => [ |
|
612 | - [ |
|
613 | - 'id' => 48, |
|
614 | - 'name' => 'workaholic', |
|
615 | - ], |
|
616 | - ], |
|
617 | - ], |
|
618 | - 5 => [ |
|
619 | - 'category_name' => 'Ticked Off', |
|
620 | - 'behaviors' => [ |
|
621 | - [ |
|
622 | - 'id' => 72, |
|
623 | - 'name' => 'black and white, all or nothing thinking', |
|
624 | - ], [ |
|
625 | - 'id' => 79, |
|
626 | - 'name' => 'blaming', |
|
627 | - ], [ |
|
628 | - 'id' => 89, |
|
629 | - 'name' => 'obsessive (stuck) thoughts', |
|
630 | - ], |
|
631 | - ], |
|
632 | - ], |
|
633 | - 6 => [ |
|
634 | - 'category_name' => 'Exhausted', |
|
635 | - 'behaviors' => [ |
|
636 | - [ |
|
637 | - 'id' => 111, |
|
638 | - 'name' => 'seeking out old unhealthy people and places', |
|
639 | - ], [ |
|
640 | - 'id' => 118, |
|
641 | - 'name' => 'not returning phone calls', |
|
642 | - ], |
|
643 | - ], |
|
644 | - ], |
|
645 | - 7 => [ |
|
646 | - 'category_name' => 'Relapse/Moral Failure', |
|
647 | - 'behaviors' => [ |
|
648 | - [ |
|
649 | - 'id' => 122, |
|
650 | - 'name' => 'returning to the place you swore you would never go again', |
|
651 | - ], |
|
652 | - ], |
|
653 | - ], |
|
598 | + 'category_name' => 'Anxiety', |
|
599 | + 'behaviors' => [ |
|
600 | + [ |
|
601 | + 'id' => 29, |
|
602 | + 'name' => 'using profanity', |
|
603 | + ], [ |
|
604 | + 'id' => 41, |
|
605 | + 'name' => 'co-dependent rescuing', |
|
606 | + ], |
|
607 | + ], |
|
608 | + ], |
|
609 | + 4 => [ |
|
610 | + 'category_name' => 'Speeding Up', |
|
611 | + 'behaviors' => [ |
|
612 | + [ |
|
613 | + 'id' => 48, |
|
614 | + 'name' => 'workaholic', |
|
615 | + ], |
|
616 | + ], |
|
617 | + ], |
|
618 | + 5 => [ |
|
619 | + 'category_name' => 'Ticked Off', |
|
620 | + 'behaviors' => [ |
|
621 | + [ |
|
622 | + 'id' => 72, |
|
623 | + 'name' => 'black and white, all or nothing thinking', |
|
624 | + ], [ |
|
625 | + 'id' => 79, |
|
626 | + 'name' => 'blaming', |
|
627 | + ], [ |
|
628 | + 'id' => 89, |
|
629 | + 'name' => 'obsessive (stuck) thoughts', |
|
630 | + ], |
|
631 | + ], |
|
632 | + ], |
|
633 | + 6 => [ |
|
634 | + 'category_name' => 'Exhausted', |
|
635 | + 'behaviors' => [ |
|
636 | + [ |
|
637 | + 'id' => 111, |
|
638 | + 'name' => 'seeking out old unhealthy people and places', |
|
639 | + ], [ |
|
640 | + 'id' => 118, |
|
641 | + 'name' => 'not returning phone calls', |
|
642 | + ], |
|
643 | + ], |
|
644 | + ], |
|
645 | + 7 => [ |
|
646 | + 'category_name' => 'Relapse/Moral Failure', |
|
647 | + 'behaviors' => [ |
|
648 | + [ |
|
649 | + 'id' => 122, |
|
650 | + 'name' => 'returning to the place you swore you would never go again', |
|
651 | + ], |
|
652 | + ], |
|
653 | + ], |
|
654 | 654 | ]; |
655 | 655 | |
656 | 656 | public $exportData = [ |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | $this->container = new \yii\di\Container; |
726 | 726 | $this->container->set('common\interfaces\UserInterface', '\site\tests\_support\MockUser'); |
727 | 727 | $this->container->set('common\interfaces\UserBehaviorInterface', '\site\tests\_support\MockUserBehavior'); |
728 | - $this->container->set('common\interfaces\TimeInterface', function () { |
|
728 | + $this->container->set('common\interfaces\TimeInterface', function() { |
|
729 | 729 | return new \common\components\Time('America/Los_Angeles'); |
730 | 730 | }); |
731 | 731 | |
@@ -769,21 +769,21 @@ discard block |
||
769 | 769 | } |
770 | 770 | |
771 | 771 | public function testParseQuestionData() { |
772 | - $this->specify('parseQuestionData should function correctly', function () { |
|
772 | + $this->specify('parseQuestionData should function correctly', function() { |
|
773 | 773 | expect('parseQuestionData should return the correct structure with expected data', $this->assertEquals($this->user->parseQuestionData($this->questionData), $this->userQuestions)); |
774 | 774 | expect('parseQuestionData should return empty with the empty set', $this->assertEmpty($this->user->parseQuestionData([]))); |
775 | 775 | }); |
776 | 776 | } |
777 | 777 | |
778 | 778 | public function testParseBehaviorData() { |
779 | - $this->specify('parseBehaviorData should function correctly', function () { |
|
779 | + $this->specify('parseBehaviorData should function correctly', function() { |
|
780 | 780 | expect('parseBehaviorData should return the correct structure with expected data', $this->assertEquals($this->user->parseBehaviorData($this->behaviorData), $this->userBehaviors)); |
781 | 781 | expect('parseBehaviorData should return empty with the empty set', $this->assertEmpty($this->user->parseBehaviorData([]))); |
782 | 782 | }); |
783 | 783 | } |
784 | 784 | |
785 | 785 | public function testIsTokenCurrent() { |
786 | - $this->specify('isTokenCurrent should function correctly', function () { |
|
786 | + $this->specify('isTokenCurrent should function correctly', function() { |
|
787 | 787 | $good_token = \Yii::$app |
788 | 788 | ->getSecurity() |
789 | 789 | ->generateRandomString() . '_' . time(); |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | public function testConfirmVerifyEmailToken() { |
806 | 806 | $this->user->verify_email_token = 'hello_world'; |
807 | 807 | $this->user->confirmVerifyEmailToken(); |
808 | - expect('confirmVerifyEmailToken should append User::CONFIRMED_STRING to the end of the verify_email_token property', $this->assertEquals($this->user->verify_email_token, 'hello_world'.$this->user::CONFIRMED_STRING)); |
|
808 | + expect('confirmVerifyEmailToken should append User::CONFIRMED_STRING to the end of the verify_email_token property', $this->assertEquals($this->user->verify_email_token, 'hello_world' . $this->user::CONFIRMED_STRING)); |
|
809 | 809 | } |
810 | 810 | |
811 | 811 | public function testIsVerified() { |
@@ -14,103 +14,103 @@ discard block |
||
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], |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | public function getCategories() { |
181 | 181 | $bhvrs_by_cat = AH::index(self::$behaviors, null, 'category_id'); |
182 | 182 | $cats = AH::index(\common\models\Category::$categories, "id"); |
183 | - foreach($cats as $id => &$cat) { |
|
183 | + foreach ($cats as $id => &$cat) { |
|
184 | 184 | $cat['behavior_count'] = count($bhvrs_by_cat[$id]); // add count of behaviors |
185 | 185 | $cat['category_id'] = $cat['id']; // rename id to category_id |
186 | 186 | unset($cat['id']); |
@@ -12,13 +12,13 @@ |
||
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 = [ |
@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | 'common\interfaces\QuestionInterface' => \common\models\Question::class, |
11 | 11 | 'common\interfaces\BehaviorInterface' => \common\models\Behavior::class, |
12 | 12 | 'common\interfaces\CategoryInterface' => \common\models\Category::class, |
13 | - 'common\interfaces\TimeInterface' => function () { |
|
14 | - if(Yii::$app->user->getIsGuest()) { |
|
13 | + 'common\interfaces\TimeInterface' => function() { |
|
14 | + if (Yii::$app->user->getIsGuest()) { |
|
15 | 15 | return new \common\components\Time('UTC'); |
16 | 16 | } else { |
17 | 17 | return new \common\components\Time(Yii::$app->user->identity->timezone); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | ], |
29 | 29 | 'components' => [ |
30 | 30 | // by default, sessions are stored in a local file |
31 | - 'cache' => [ // DummyCache never actually caches anything |
|
31 | + 'cache' => [// DummyCache never actually caches anything |
|
32 | 32 | 'class'=> yii\caching\DummyCache::class, |
33 | 33 | ], |
34 | 34 | 'mailer' => [ |