Completed
Pull Request — master (#167)
by Corey
06:12 queued 03:00
created
site/views/site/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         <?= $form->field($model, 'subject') ?>
58 58
         <?= $form->field($model, 'body')->textArea(['rows' => 6]) ?>
59 59
 
60
-        <?php if(Yii::$app->user->isGuest) {
60
+        <?php if (Yii::$app->user->isGuest) {
61 61
           // only show captcha if user is not logged in
62 62
           print $form->field($model, 'verifyCode')->widget(Captcha::class, [
63 63
             'template' => '<div class="row"><div class="col-md-4">{image}</div><div class="col-md-8">{input}</div></div>',
Please login to merge, or discard this patch.
site/views/site/signup.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
     <div class="col-md-6 col-md-offset-3">
23 23
       <h1>Sign up</h1>
24 24
 			<?php $form = ActiveForm::begin([
25
-				'id' => 'form-signup',
26
-				'enableClientValidation' => true,
25
+        'id' => 'form-signup',
26
+        'enableClientValidation' => true,
27 27
         'enableAjaxValidation' => false,
28 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() ?>
32 32
         <?= $form->field($model, 'timezone')->dropDownList(array_combine($timezones, $timezones)); ?>
Please login to merge, or discard this patch.
site/views/profile/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@
 block discarded – undo
70 70
 ]); ?>
71 71
           <?= $form->field($profile, 'timezone')->dropDownList(array_combine($timezones, $timezones)); ?>
72 72
           <?= $form->field($profile, 'expose_graph')->checkbox() ?>
73
-          <?php if($profile->expose_graph): ?>
73
+          <?php if ($profile->expose_graph): ?>
74 74
           <div class='alert alert-success score-graph-info'>Your score graph can be found at:<br /> <a id="score-graph-link" target="_blank" href="<?=$graph_url?>"><?=$graph_url?></a></div>
75 75
           <?php endif; ?>
76 76
         <?= $form->field($profile, 'send_email')->checkbox() ?>
77
-        <div id='email_threshold_fields' <?php if(!$profile->send_email) { ?>style="display: none;"<?php } ?>>
77
+        <div id='email_threshold_fields' <?php if (!$profile->send_email) { ?>style="display: none;"<?php } ?>>
78 78
           <?= $form->field($profile, 'email_threshold')->textInput(['class'=>'form-control', 'style'=>'width: 50px;'])->input('number', ['min' => 0, 'max' => 1000]) ?>
79 79
           <?= $form->field($profile, 'partner_email1')->input('email'); ?>
80 80
           <?= $form->field($profile, 'partner_email2')->input('email'); ?>
Please login to merge, or discard this patch.
site/controllers/SiteController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
   public function actionBlog()
77 77
   {
78 78
     $time = Yii::$container->get(\common\interfaces\TimeInterface::class); 
79
-    $key = "index_blog_".$time->getLocalDate('UTC');
79
+    $key = "index_blog_" . $time->getLocalDate('UTC');
80 80
     $posts = Yii::$app->cache->get($key);
81
-    if($posts === false) {
81
+    if ($posts === false) {
82 82
       $posts = \Yii::$app->getModule('blog')
83 83
                             ->fetch()
84 84
                             ->parse()
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
   {
112 112
     $model = new ContactForm();
113 113
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
114
-      if($model->sendEmail(Yii::$app->params['adminEmail'])) {
114
+      if ($model->sendEmail(Yii::$app->params['adminEmail'])) {
115 115
         Yii::$app->session->setFlash('success', 'Thank you for contacting us. We will respond to you as soon as possible.');
116 116
       } else {
117 117
         Yii::$app->session->setFlash('error', 'There was an error sending email.');
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
   public function actionSignup()
144 144
   {
145 145
     $model = Yii::$container->get(\site\models\SignupForm::class);
146
-    if($model->load(Yii::$app->request->post()) && $model->validate()) {
146
+    if ($model->load(Yii::$app->request->post()) && $model->validate()) {
147 147
       $model->signup();
148 148
       Yii::$app->getSession()->setFlash('success', 'We have sent a verification email to the email address you provided. Please check your inbox and follow the instructions to verify your account.');
149
-      return $this->redirect('/',302);
149
+      return $this->redirect('/', 302);
150 150
     }
151 151
 
152 152
     return $this->render('signup', [
@@ -157,10 +157,10 @@  discard block
 block discarded – undo
157 157
   public function actionRequestPasswordReset()
158 158
   {
159 159
     $model = Yii::$container->get(\site\models\PasswordResetRequestForm::class);
160
-    if($model->load(Yii::$app->request->post()) && $model->validate()) {
161
-      if(!$model->sendEmail()) {
160
+    if ($model->load(Yii::$app->request->post()) && $model->validate()) {
161
+      if (!$model->sendEmail()) {
162 162
         $ip = Yii::$app->getRequest()->getUserIP() ?: "UNKNOWN";
163
-        Yii::warning("$ip has tried to reset the password for ".$model->email);
163
+        Yii::warning("$ip has tried to reset the password for " . $model->email);
164 164
       }
165 165
 
166 166
       Yii::$app->getSession()->setFlash('success', 'If there is an account with the submitted email address you will receive further instructions in your email inbox.');
@@ -203,14 +203,14 @@  discard block
 block discarded – undo
203 203
       throw new BadRequestHttpException("Wrong or expired email verification token. If you aren't sure why this error occurs perhaps you've already verified your account. Please try logging in.");
204 204
     }
205 205
 
206
-    if($user->isTokenConfirmed($user->verify_email_token)) {
206
+    if ($user->isTokenConfirmed($user->verify_email_token)) {
207 207
       Yii::$app->getSession()->setFlash('success', 'Your account has already been verified. Please log in.');
208
-      return $this->redirect('/login',302);
208
+      return $this->redirect('/login', 302);
209 209
     } else if (Yii::$app->getUser()->login($user)) {
210 210
       $user->confirmVerifyEmailToken();
211 211
       $user->save();
212 212
       Yii::$app->getSession()->setFlash('success', 'Your account has been verified. Please continue with your check-in.');
213
-      return $this->redirect('/welcome',302);
213
+      return $this->redirect('/welcome', 302);
214 214
     }
215 215
   }
216 216
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
   public function actionExport()
228 228
   {
229 229
     header("Content-Type: text/csv");
230
-    header("Content-Disposition: attachment; filename=fsa-data-export-".Yii::$app->user->identity->email."-".date('Ymd').".csv");
230
+    header("Content-Disposition: attachment; filename=fsa-data-export-" . Yii::$app->user->identity->email . "-" . date('Ymd') . ".csv");
231 231
 
232 232
     $reader = Yii::$app->user->identity->getExportData();
233 233
     $fp = fopen('php://output', 'w');
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
     fputcsv($fp, $header);
245 245
     $user_behavior = Yii::$container->get(\common\interfaces\UserBehaviorInterface::class);
246
-    while($row = $reader->read()) {
246
+    while ($row = $reader->read()) {
247 247
       $row = $user_behavior::decorateWithCategory([$row]);
248 248
       $row = Yii::$app->user->identity->cleanExportData($row);
249 249
       fputcsv($fp, $row[0]);
Please login to merge, or discard this patch.