Passed
Pull Request — master (#190)
by Corey
03:07
created
site/views/checkin/view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         foreach ($behavior_questions['answers'] as $question) {
80 80
             print "<div class='col-md-4'>";
81 81
             print "<p><strong>{$question['title']}</strong></p>";
82
-            print "<p>".Html::encode($question['answer'])."</p>";
82
+            print "<p>" . Html::encode($question['answer']) . "</p>";
83 83
             print "</div>";
84 84
         }
85 85
         print "</div></div>";
Please login to merge, or discard this patch.
site/views/checkin/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     $behaviors = AH::map($behaviorsList[$category['id']], 'id', 'name');
41 41
     $custom = [];
42 42
     if (array_key_exists($category['id'], $customList)) {
43
-        $custom = AH::map($customList[$category['id']], function ($cbhvr) {
43
+        $custom = AH::map($customList[$category['id']], function($cbhvr) {
44 44
             return $cbhvr['id'] . '-custom';
45 45
         }, 'name');
46 46
     }
Please login to merge, or discard this patch.
site/views/checkin/report.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
28 28
               </tr>
29 29
   <?php foreach ($top_behaviors as $key => $row) {
30 30
     $num = $key + 1;
31
-    print "<tr>".
32
-    "<td>{$row['count']}</td>".
33
-    "<td>{$row['behavior']['name']}</td>".
34
-    "<td>{$row['category']['name']}</td>".
31
+    print "<tr>" .
32
+    "<td>{$row['count']}</td>" .
33
+    "<td>{$row['behavior']['name']}</td>" .
34
+    "<td>{$row['category']['name']}</td>" .
35 35
     "</tr>";
36 36
 }
37 37
   ?>
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
@@ -14,9 +14,9 @@
 block discarded – undo
14 14
         $name,
15 15
         $checked,
16 16
         ['value' => $value,
17
-     'label' => $label,
18
-     'container' => false,
19
-     'labelOptions' => [ 'class' => $checked
17
+      'label' => $label,
18
+      'container' => false,
19
+      'labelOptions' => [ 'class' => $checked
20 20
                                      ? 'btn btn-info active'
21 21
                                      : 'btn btn-info'],
22 22
     ]
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         ['value' => $value,
17 17
      'label' => $label,
18 18
      'container' => false,
19
-     'labelOptions' => [ 'class' => $checked
19
+     'labelOptions' => ['class' => $checked
20 20
                                      ? 'btn btn-info active'
21 21
                                      : 'btn btn-info'],
22 22
     ]
Please login to merge, or discard this patch.
site/web/router.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@
 block discarded – undo
3 3
 header("Access-Control-Allow-Origin: *");
4 4
 $root = $_SERVER['DOCUMENT_ROOT'];
5 5
 chdir($root);
6
-$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'], '/');
7
-set_include_path(get_include_path().':'.__DIR__);
8
-if (file_exists($root.$path)) {
9
-    if (is_dir($root.$path) && substr($path, strlen($path) - 1, 1) !== '/') {
10
-        $path = rtrim($path, '/').'/index.php';
6
+$path = '/' . ltrim(parse_url($_SERVER['REQUEST_URI'])['path'], '/');
7
+set_include_path(get_include_path() . ':' . __DIR__);
8
+if (file_exists($root . $path)) {
9
+    if (is_dir($root . $path) && substr($path, strlen($path) - 1, 1) !== '/') {
10
+        $path = rtrim($path, '/') . '/index.php';
11 11
     }
12 12
     if (strpos($path, '.php') === false) {
13 13
         return false;
14 14
     } else {
15
-        chdir(dirname($root.$path));
16
-        require_once $root.$path;
15
+        chdir(dirname($root . $path));
16
+        require_once $root . $path;
17 17
     }
18 18
 } else {
19 19
     include_once 'index.php';
Please login to merge, or discard this patch.
site/controllers/SiteController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function actionBlog()
56 56
     {
57 57
         $time = Yii::$container->get(\common\interfaces\TimeInterface::class);
58
-        $key = "index_blog_".$time->getLocalDate('UTC');
58
+        $key = "index_blog_" . $time->getLocalDate('UTC');
59 59
         $posts = Yii::$app->cache->get($key);
60 60
         if ($posts === false) {
61 61
             $posts = \Yii::$app->getModule('blog')
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         if ($model->load(Yii::$app->request->post()) && $model->validate()) {
139 139
             if (!$model->sendEmail()) {
140 140
                 $ip = Yii::$app->getRequest()->getUserIP() ?: "UNKNOWN";
141
-                Yii::warning("$ip has tried to reset the password for ".$model->email);
141
+                Yii::warning("$ip has tried to reset the password for " . $model->email);
142 142
             }
143 143
 
144 144
             Yii::$app->session->setFlash('success', 'If there is an account with the submitted email address you will receive further instructions in your email inbox.<br /><br />If the email does not arrive please check your spam folder.');
Please login to merge, or discard this patch.
site/controllers/CustomBehaviorController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function actions()
42 42
     {
43 43
         return array_replace_recursive(parent::actions(), [
44
-      'update' => [  // identifier for your editable column action
44
+      'update' => [// identifier for your editable column action
45 45
         'class'           => EditableColumnAction::className(), // action class name
46 46
         'modelClass'      => CustoMBehavior::className(), // the model for the record being edited
47 47
         'scenario'        => CustomBehavior::SCENARIO_DEFAULT, // model scenario assigned before validation & update
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         'errorOptions'    => ['header' => ''], // error summary HTML options
50 50
         'postOnly'        => true,
51 51
         'ajaxOnly'        => true,
52
-        'findModel'       => function ($id, $action) {
52
+        'findModel'       => function($id, $action) {
53 53
             $model = $this->findModel($id);
54 54
             if ($model !== null) {
55 55
                 return $model;
Please login to merge, or discard this patch.
site/controllers/ProfileController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             'allow'   => true,
29 29
             'roles'   => ['@'],
30 30
           ], [
31
-            'actions' => [ 'change-email', ],
31
+            'actions' => ['change-email', ],
32 32
             'allow'   => true,
33 33
           ],
34 34
         ],
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     public function actionExport()
151 151
     {
152 152
         header("Content-Type: text/csv");
153
-        header("Content-Disposition: attachment; filename=fsa-data-export-".Yii::$app->user->identity->email."-".date('Ymd').".csv");
153
+        header("Content-Disposition: attachment; filename=fsa-data-export-" . Yii::$app->user->identity->email . "-" . date('Ymd') . ".csv");
154 154
 
155 155
         $reader = Yii::$app->user->identity->getExportData();
156 156
         $fp = fopen('php://output', 'w');
Please login to merge, or discard this patch.
site/controllers/CheckinController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             return $this->redirect(['questions']);
50 50
         }
51 51
 
52
-        $behaviors  = Yii::$container->get(BehaviorInterface::class)::$behaviors;
52
+        $behaviors = Yii::$container->get(BehaviorInterface::class)::$behaviors;
53 53
         $custom = \common\models\CustomBehavior::find()->where(['user_id' => Yii::$app->user->id])->asArray()->all();
54 54
         return $this->render('index', [
55 55
       'categories'    => Yii::$container->get(CategoryInterface::class)::$categories,
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         $raw_pie_data  = $user_behavior::decorate($user_behavior->getBehaviorsWithCounts());
136 136
         $answer_pie    = $user_behavior->getBehaviorsByCategory($raw_pie_data);
137 137
 
138
-        $pie_data   = [
138
+        $pie_data = [
139 139
       "labels"   => array_column($answer_pie, "name"),
140 140
       "datasets" => [[
141 141
           "data"                 => array_map('intval', array_column($answer_pie, "count")),
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
         $accum = [];
175 175
         foreach ($checkins as $date => $cats) {
176
-            for ($i = 1; $i <= 7; $i ++) {
176
+            for ($i = 1; $i <= 7; $i++) {
177 177
                 $accum[$i][] = array_key_exists($i, $cats) ? $cats[$i]['count'] : [];
178 178
             }
179 179
         }
Please login to merge, or discard this patch.