Completed
Pull Request — master (#159)
by Corey
03:50
created
site/classes/View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         }
37 37
 
38 38
         if (!empty($this->json)) {
39
-          foreach($this->json[self::POS_READY] as $json_name => $json_value) {
39
+          foreach ($this->json[self::POS_READY] as $json_name => $json_value) {
40 40
             $lines[] = Html::script($json_value, ['type' => 'application/json', 'id' => $json_name]);
41 41
           }
42 42
         }
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
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
           <?= $form->field($profile, 'email', ['inputTemplate' => '<div class="input-group"><span class="input-group-addon">@</span>{input}</div>']); ?>
26 26
           <?= $form->field($profile, 'timezone')->dropDownList(array_combine($timezones, $timezones)); ?>
27 27
           <?= $form->field($profile, 'expose_graph')->checkbox() ?>
28
-          <?php if($profile->expose_graph): ?>
28
+          <?php if ($profile->expose_graph): ?>
29 29
           <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>
30 30
           <?php endif; ?>
31 31
         <?= $form->field($profile, 'send_email')->checkbox() ?>
32
-        <div id='email_threshold_fields' <?php if(!$profile->send_email) { ?>style="display: none;"<?php } ?>>
32
+        <div id='email_threshold_fields' <?php if (!$profile->send_email) { ?>style="display: none;"<?php } ?>>
33 33
           <?= $form->field($profile, 'email_threshold')->textInput(['class'=>'form-control', 'style'=>'width: 50px;'])->input('number', ['min' => 0, 'max' => 1000]) ?>
34 34
           <?= $form->field($profile, 'partner_email1')->input('email'); ?>
35 35
           <?= $form->field($profile, 'partner_email2')->input('email'); ?>
Please login to merge, or discard this patch.
site/views/partials/posts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 use \yii\helpers\Html;
3 3
 
4
-foreach($posts as $file) {
4
+foreach ($posts as $file) {
5 5
   $yaml       = $file['yaml'];
6 6
   $content    = $file['content'];
7 7
   $short_name = Html::encode($file['date']['name']);
Please login to merge, or discard this patch.
site/views/site/error.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $this->title = "The Faster Scale App | $name";
14 14
 $code = $exception->statusCode;
15 15
 
16
-if($code === 404):
16
+if ($code === 404):
17 17
   $this->title = "The Faster Scale App | Page Not Found";
18 18
 ?>
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
   <p>Otherwise, please ensure your attempted url is correct.</p>
24 24
 
25 25
 <?php
26
-elseif($code >= 500 && $code < 600):
26
+elseif ($code >= 500 && $code < 600):
27 27
   $this->title = "The Faster Scale App | Oops";
28 28
 ?>
29 29
   <h1>It's not you. It's us.</h1>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@  discard block
 block discarded – undo
30 30
   <div class="alert alert-danger"><?= nl2br(Html::encode($name)) ?></div>
31 31
   <p>Well this is embarrassing...we're having an error on our side. So sorry for the annoyance. If you'd like to help, please send us a message on our <a href='<?=Url::to(['site/contact'])?>'>contact form</a>.</p>
32 32
 
33
-<?php else: ?>
33
+<?php else {
34
+  : ?>
34 35
 
35 36
 <div class="site-error">
36 37
   <h1><?= Html::encode($name) ?></h1>
@@ -38,4 +39,6 @@  discard block
 block discarded – undo
38 39
   <p>The above error occurred while the Web server was processing your request.</p>
39 40
   <p>Please contact us if you think this is a server error. Thank you.</p>
40 41
 </div>
41
-<?php endif; ?> 
42
+<?php endif;
43
+}
44
+?> 
Please login to merge, or discard this patch.
site/views/site/signup.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
   <div class="row">
23 23
     <div class="col-md-5">
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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='email_threshold_fields' <?php if(!$model->send_email) { ?>style="display: none;"<?php } ?>>
37
+        <div id='email_threshold_fields' <?php if (!$model->send_email) { ?>style="display: none;"<?php } ?>>
38 38
           <?= $form->field($model, 'email_threshold', ['template' => '{label}<div class="row"><div class="col-md-3">{input}</div><div class="col-md-9"><p class="bg-info text-center" style="margin: 5px 0px;">We recommend starting with 30</p></div></div>{error}'])->textInput(['class'=>'form-control'])->input('number', ['min' => 0, 'max' => 100]) ?>
39 39
           <?= $form->field($model, 'partner_email1')->input('email') ?>
40 40
           <?= $form->field($model, 'partner_email2')->input('email') ?>
Please login to merge, or discard this patch.
site/views/layouts/main.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
  */
14 14
 site\assets\AppAsset::register($this);
15 15
 
16
-if($hash = Utility::getRevHash()) {
17
-  $rev_link = '<a href="'.Utility::getGithubRevUrl().'">'.Utility::getRevHash().'</a>';
16
+if ($hash = Utility::getRevHash()) {
17
+  $rev_link = '<a href="' . Utility::getGithubRevUrl() . '">' . Utility::getRevHash() . '</a>';
18 18
 } else $rev_link = 'DEVELOPMENT';
19 19
 
20 20
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
 
16 16
 if($hash = Utility::getRevHash()) {
17 17
   $rev_link = '<a href="'.Utility::getGithubRevUrl().'">'.Utility::getRevHash().'</a>';
18
-} else $rev_link = 'DEVELOPMENT';
18
+} else {
19
+  $rev_link = 'DEVELOPMENT';
20
+}
19 21
 
20 22
 ?>
21 23
 <?php $this->beginPage() ?>
Please login to merge, or discard this patch.
site/views/checkin/index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
   print $form
41 41
           ->field($model, "behaviors{$category['id']}")
42 42
           ->checkboxList($behaviors,
43
-                         ['data-toggle' => 'buttons', 'item' => "checkboxItemTemplate"]);
43
+                          ['data-toggle' => 'buttons', 'item' => "checkboxItemTemplate"]);
44 44
 }
45 45
 print Html::submitButton('Submit', ['class' => 'btn btn-success']); 
46 46
 ActiveForm::end();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@  discard block
 block discarded – undo
10 10
 $this->title = "The Faster Scale App | Check-in";
11 11
 
12 12
 function checkboxItemTemplate($index, $label, $name, $checked, $value) {
13
-  return Html::checkbox
14
-    (
13
+  return Html::checkbox(
15 14
       $name,
16 15
       $checked,
17 16
       [
@@ -35,7 +34,7 @@  discard block
 block discarded – undo
35 34
   'options' => ['class' => 'form-horizontal'],
36 35
 ]);
37 36
 
38
-foreach($categories as $category) {
37
+foreach ($categories as $category) {
39 38
   $behaviors = AH::map($behaviorsList[$category['id']], 'id', 'name');
40 39
   print $form
41 40
           ->field($model, "behaviors{$category['id']}")
Please login to merge, or discard this patch.
site/views/checkin/view.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
     print $form
93 93
             ->field($model, "behaviors{$category['id']}")
94 94
             ->checkboxList($behaviors,
95
-                           ['item' => "checkboxItemTemplate"]);
95
+                            ['item' => "checkboxItemTemplate"]);
96 96
   }
97 97
   ActiveForm::end();
98 98
 
Please login to merge, or discard this patch.
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
41 41
 
42 42
   <?php
43 43
               switch(true) {
44
-                case ($score < 30):
45
-                  $alert_level = "success";
46
-                  $alert_msg = "You're doing well! Keep on doing whatever it is you're doing!";
47
-                  break;
44
+              case ($score < 30):
45
+                $alert_level = "success";
46
+                $alert_msg = "You're doing well! Keep on doing whatever it is you're doing!";
47
+                break;
48 48
 
49 49
               case ($score < 40):
50 50
                 $alert_level = "info";
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
   </div>
41 41
 
42 42
   <?php
43
-              switch(true) {
43
+              switch (true) {
44 44
                 case ($score < 30):
45 45
                   $alert_level = "success";
46 46
                   $alert_msg = "You're doing well! Keep on doing whatever it is you're doing!";
@@ -67,15 +67,15 @@  discard block
 block discarded – undo
67 67
     <div class='alert alert-<?=$alert_level?>'><?=$alert_msg?></div>
68 68
 </div>
69 69
 
70
-  <?php if($questions) {
71
-  foreach($questions as $behavior_id => $behavior_questions) {
70
+  <?php if ($questions) {
71
+  foreach ($questions as $behavior_id => $behavior_questions) {
72 72
     print "<div class='well well-sm'>";
73 73
     print "<button type='button' class='btn btn-primary' disabled='disabled'>{$behavior_questions['question']['title']}</button>";
74 74
     print "<div class='row'>";
75
-    foreach($behavior_questions['answers'] as $question) { 
75
+    foreach ($behavior_questions['answers'] as $question) { 
76 76
       print "<div class='col-md-4'>";
77 77
       print "<p><strong>{$question['title']}</strong></p>";
78
-      print "<p>".Html::encode($question['answer'])."</p>";
78
+      print "<p>" . Html::encode($question['answer']) . "</p>";
79 79
       print "</div>";
80 80
     }
81 81
     print "</div></div>";
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     'options' => ['class' => 'form-horizontal'],
88 88
   ]);
89 89
 
90
-  foreach($categories as $category) {
90
+  foreach ($categories as $category) {
91 91
     $behaviors = AH::map($behaviorsList[$category['id']], 'id', 'name');
92 92
     print $form
93 93
             ->field($model, "behaviors{$category['id']}")
Please login to merge, or discard this patch.
site/views/checkin/questions.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
     $name,
13 13
     $checked,
14 14
     ['value' => $value,
15
-     'label' => $label,
16
-     'container' => false,
17
-     'labelOptions' => [ 'class' => $checked
15
+      'label' => $label,
16
+      'container' => false,
17
+      'labelOptions' => [ 'class' => $checked
18 18
                                      ? 'btn btn-info active'
19 19
                                      : 'btn btn-info'],
20 20
     ]);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     ['value' => $value,
15 15
      'label' => $label,
16 16
      'container' => false,
17
-     'labelOptions' => [ 'class' => $checked
17
+     'labelOptions' => ['class' => $checked
18 18
                                      ? 'btn btn-info active'
19 19
                                      : 'btn btn-info'],
20 20
     ]);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
   'id' => 'checkin-form',
33 33
 ]);
34 34
 
35
-foreach($categories as $category_id => $category_name) {
35
+foreach ($categories as $category_id => $category_name) {
36 36
   print $form->field($model, "user_behavior_id{$category_id}")->radioList($behaviors[$category_id], ['class' => "btn-group", 'data-toggle' => 'buttons', 'item'=>"radioItemTemplate"]);
37 37
   print $form->field($model, "answer_{$category_id}a")->textarea()->label("How does it affect me? How do I act and feel?");
38 38
   print $form->field($model, "answer_{$category_id}b")->textarea()->label("How does it affect the important people in my life?");
Please login to merge, or discard this patch.