Passed
Push — main ( 72615c...3796a3 )
by A
02:35
created
view/view-tag-questions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         <th>Antal svar</th>
34 34
     </tr>
35 35
 <?php $id = 0; foreach ($questions as $row) :
36
-    $id++;?>
36
+    $id++; ?>
37 37
     <tr>
38 38
         <td><?= $id ?></td>
39 39
         <!-- länk till frågan -->
Please login to merge, or discard this patch.
view/view-question.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
 
25 25
 <!-- Show the question -->
26 26
 <div class="main-question">
27
-    <?php echo $filter->parse($res[0]->question, ["markdown"])->text ?>
28
-    - <a href="<?= url("user/viewProfile/{$res[0]->acronym}"); ?>"><?php echo $res[0]->acronym ?></a>
27
+    <?php echo $filter->parse($res[ 0 ]->question, [ "markdown" ])->text ?>
28
+    - <a href="<?= url("user/viewProfile/{$res[ 0 ]->acronym}"); ?>"><?php echo $res[ 0 ]->acronym ?></a>
29 29
     <br>
30
-    <?php echo $res[0]->created ?>
31
-    <?php if ($user == $res[0]->acronym) :?>
32
-        <br><a href="../../user/editPost/<?= $res[0]->id ?>/Question"> Ändra </a>
30
+    <?php echo $res[ 0 ]->created ?>
31
+    <?php if ($user == $res[ 0 ]->acronym) :?>
32
+        <br><a href="../../user/editPost/<?= $res[ 0 ]->id ?>/Question"> Ändra </a>
33 33
     <?php endif; ?>
34 34
     <br><br><a class="img-button" href="<?= url("user/points/Question/{$qId}/{$qId}/1"); ?>"> <?= $up ?> </a>
35 35
     <a class="img-button" href="<?= url("user/points/Question/{$qId}/{$qId}/-1"); ?>"> <?= $down ?> </a>
36
-    Poäng: <?= $res[0]->points ?>
36
+    Poäng: <?= $res[ 0 ]->points ?>
37 37
 </div>
38 38
 
39 39
 <!-- Show comments connected to question -->
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
             <a class="img-button" href="<?= url("user/points/Comments/{$qId}/{$com->id}/-1"); ?>"> <?= $down ?> </a>
47 47
         </div>
48 48
         <div class="q-comments">
49
-            <?php echo $filter->parse($com->comment, ["markdown"])->text ?>
49
+            <?php echo $filter->parse($com->comment, [ "markdown" ])->text ?>
50 50
             - <a href="<?= url("user/viewProfile/{$com->acronym}"); ?>"><?php echo $com->acronym ?></a>
51 51
             <?php echo $com->created ?>
52 52
             <?php if ($user == $com->acronym) :?>
53 53
                 <br><br><a href="../../user/editPost/<?= $com->id ?>/Comments"> Ändra </a>
54 54
             <?php endif; ?>
55
-            <?php if ($user == $res[0]->acronym) :?>
55
+            <?php if ($user == $res[ 0 ]->acronym) :?>
56 56
                 <p><a class="answer-button" href="<?= url("user/acceptAnswer/{$qId}/{$com->id}"); ?>"> Godkänn som svar </a></p>
57 57
             <?php endif; ?>
58 58
         </div>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     <div class="answer">
69 69
         <h4 class="answer-h4">Svar</h4>
70 70
         <!-- <?= $row->id ?><br> -->
71
-        <?php echo $filter->parse($row->answer, ["markdown"])->text ?><br>
71
+        <?php echo $filter->parse($row->answer, [ "markdown" ])->text ?><br>
72 72
         - <a href="<?= url("user/viewProfile/{$row->acronym}"); ?>"><?php echo $row->acronym ?></a><br>
73 73
         <?= $row->created ?>
74 74
         <?php if ($user == $row->acronym) :?>
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
             <a class="img-button" href="<?= url("user/points/AnswerComments/{$qId}/{$comment->id}/-1"); ?>"> <?= $down ?> </a>
89 89
         </div>
90 90
         <div class="a-comments">
91
-        <?php echo $filter->parse($comment->comment, ["markdown"])->text ?>
91
+        <?php echo $filter->parse($comment->comment, [ "markdown" ])->text ?>
92 92
         - <a href="<?= url("user/viewProfile/{$comment->acronym}"); ?>"><?php echo $comment->acronym ?></a>
93 93
         <?= $comment->created ?><br>
94 94
         <?php if ($user == $comment->acronym) :?>
95 95
             <a href="../../user/editPost/<?= $comment->id ?>/AnswerComments"> Ändra </a>
96 96
         <?php endif; ?>
97
-        <?php if ($user == $res[0]->acronym) :?>
97
+        <?php if ($user == $res[ 0 ]->acronym) :?>
98 98
             <p><a class="answer-button" href="<?= url("user/acceptAnswer/{$qId}/{$row->id}"); ?>"> Godkänn som svar </a></p>
99 99
         <?php endif; ?>
100 100
     </div>
Please login to merge, or discard this patch.
view/users.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 <h1>Användare</h1>
14 14
 <!-- länk till alla frågor som innehåller taggen -->
15 15
 <?php $id = 0; foreach ($users as $row) :
16
-    $id++;?>
16
+    $id++; ?>
17 17
     <p><a href="<?= url("user/viewProfile/{$row->acronym}"); ?>"><?= $row->acronym ?></a></p>
18 18
 <?php endforeach; ?>
Please login to merge, or discard this patch.
view/profile-edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $imageSize2 = "?width=100&height=100&crop-to-fit&area=0,0,0,0";
14 14
 ?>
15 15
 <h1>Profil (<?= $acronym ?>)
16
-<img src="<?= $baseURL ?>/image/profile/<?= $user[0]->picture ?><?= $imageSize ?>"></img>
16
+<img src="<?= $baseURL ?>/image/profile/<?= $user[ 0 ]->picture ?><?= $imageSize ?>"></img>
17 17
 </h1>
18 18
 
19 19
 <!-- om baseURL-en innehåller picture, visa detta -->
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 <?php else : ?>
45 45
 <h3>Presentation</h3>
46 46
 <form method="post">
47
-    <textarea class="info-text" name="info" rows="4"><?= $user[0]->info ?></textarea>
47
+    <textarea class="info-text" name="info" rows="4"><?= $user[ 0 ]->info ?></textarea>
48 48
     <input type="submit" name="submit" value="Ändra">
49 49
 </form>
50 50
 <?php endif ?>
Please login to merge, or discard this patch.
view/show-tags.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 <h2>Taggar</h2>
14 14
 <!-- länk till alla frågor som innehåller taggen -->
15 15
 <?php $id = 0; foreach ($res as $row) :
16
-    $id++;?>
16
+    $id++; ?>
17 17
     <p><a href="<?= url("user/viewTagQuestions/{$row}"); ?>"><?= $row ?></a></p>
18 18
 <?php endforeach; ?>
Please login to merge, or discard this patch.
view/profile.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,33 +11,33 @@
 block discarded – undo
11 11
 
12 12
 ?>
13 13
 <h1>Profil (<?= $acronym ?>)
14
-<img src="<?= $baseURL ?>/image/profile/<?= $user[0]->picture ?>?width=80&height=80&crop-to-fit&area=0,0,0,0"></img>
14
+<img src="<?= $baseURL ?>/image/profile/<?= $user[ 0 ]->picture ?>?width=80&height=80&crop-to-fit&area=0,0,0,0"></img>
15 15
 </h1>
16 16
 
17 17
 <a href="profile-edit/<?= $acronym ?>/picture">Ändra profilbild</a>
18 18
 
19 19
 <h3>Presentation</h3>
20 20
 <div class="user-presentation">
21
-    <?= $filter->parse($user[0]->info, ["markdown"])->text ?>
21
+    <?= $filter->parse($user[ 0 ]->info, [ "markdown" ])->text ?>
22 22
     <a href="profile-edit/<?= $acronym ?>/info">Ändra</a>
23 23
 </div>
24 24
 
25 25
 <h3>Aktivitet</h3>
26 26
 <div class="user-activity">
27
-    <p><b>Antal ställda frågor:</b> <?= sizeof($content ?? []) ?></p>
27
+    <p><b>Antal ställda frågor:</b> <?= sizeof($content ?? [ ]) ?></p>
28 28
 
29 29
     <?php $id = 0; foreach ($content as $row) :
30 30
         $id++; ?>
31 31
         <p><a href="<?= url("user/viewQuestion/{$row->id}"); ?>"><?= $row->question ?></a></p>
32 32
     <?php endforeach; ?>
33 33
 
34
-    <p><b>Antal skrivna svar:</b> <?= sizeof($answers ?? []) ?></p>
34
+    <p><b>Antal skrivna svar:</b> <?= sizeof($answers ?? [ ]) ?></p>
35 35
     <!-- <?php $id = 0; foreach ($answers as $row) :
36 36
         $id++; ?>
37 37
         <p><?= $row->answer ?></p>
38 38
     <?php endforeach; ?> -->
39 39
 
40
-    <p><b>Kommentarer:</b> <?= sizeof($comments ?? []) ?></p>
40
+    <p><b>Kommentarer:</b> <?= sizeof($comments ?? [ ]) ?></p>
41 41
 
42 42
     <?php $id = 0; foreach ($comments as $comment) :
43 43
         $id++; ?>
Please login to merge, or discard this patch.
view/edit-post.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@
 block discarded – undo
16 16
     <?= $table ?>
17 17
 <?php elseif ($table == "Question") : ?>
18 18
 <form method="post">
19
-    <textarea class="info-text" name="info" rows="4"><?= $post[0]->question ?></textarea>
20
-    <input type="text" class="tags-text" name="tags" value ="<?= $post[0]->tags ?>">
19
+    <textarea class="info-text" name="info" rows="4"><?= $post[ 0 ]->question ?></textarea>
20
+    <input type="text" class="tags-text" name="tags" value ="<?= $post[ 0 ]->tags ?>">
21 21
     <br><br><input type="submit" name="submit" value="Ändra">
22 22
     <input type="submit" name="delete" value="Ta bort">
23 23
 </form>
24 24
 <?php else : ?>
25 25
     <form method="post">
26
-        <textarea class="info-text" name="info" rows="4"><?= $post[0]->$rows ?></textarea>
26
+        <textarea class="info-text" name="info" rows="4"><?= $post[ 0 ]->$rows ?></textarea>
27 27
         <br><br><input type="submit" name="submit" value="Ändra">
28 28
         <input type="submit" name="delete" value="Ta bort">
29 29
     </form>
Please login to merge, or discard this patch.
view/tags.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 <h1>Taggar</h1>
14 14
 <!-- länk till alla frågor som innehåller taggen -->
15 15
 <?php $id = 0; foreach ($tags as $row) :
16
-    $id++;?>
16
+    $id++; ?>
17 17
     <p><a href="<?= url("user/viewTagQuestions/{$row}"); ?>"><?= $row ?></a></p>
18 18
 <?php endforeach; ?>
Please login to merge, or discard this patch.
view/show-all-questions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         <th>Antal svar</th>
25 25
     </tr>
26 26
 <?php $id = 0; foreach ($res as $row) :
27
-    $id++;?>
27
+    $id++; ?>
28 28
     <tr>
29 29
         <td><?= $id ?></td>
30 30
         <!-- länk till frågan -->
Please login to merge, or discard this patch.