Completed
Push — master ( e3165f...5e3d65 )
by Markus
03:05 queued 26s
created
view/profile/specific.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,20 +20,26 @@
 block discarded – undo
20 20
 <h3>Questions asked: </h3>
21 21
 <?php if (empty($questions)) : ?>
22 22
     <p>This user hasen't posted any questions yet.</p>
23
-<?php else : ?>
23
+<?php else {
24
+    : ?>
24 25
     <?php foreach ($questions as $question) : ?>
25 26
         <p>
26 27
             <a href="../../forum/question/<?= $question->id ?>"><?= $question->title ?></a>
27 28
         </p>
28
-    <?php endforeach; ?>
29
+    <?php endforeach;
30
+}
31
+?>
29 32
 <?php endif; ?>
30 33
 <h3>Answers posted: </h3>
31 34
 <?php if (empty($answers)) : ?>
32 35
     <p>This user hasn't posted any answers yet.</p>
33
-<?php else: ?>
36
+<?php else {
37
+    : ?>
34 38
     <?php foreach ($answers as $answer) : ?>
35 39
         <p>
36 40
             <a href="../../forum/question/<?= $answer->question_id ?>"><?= $answer->content ?></a>
37 41
         </p>
38
-    <?php endforeach; ?>
42
+    <?php endforeach;
43
+}
44
+?>
39 45
 <?php endif; ?>
Please login to merge, or discard this patch.
view/profile/index.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,19 +24,25 @@
 block discarded – undo
24 24
 <?php endforeach; ?>
25 25
 <?php if (empty($posts)) : ?>
26 26
     <p>You have not made any posts yet.</p>
27
-<?php else : ?>
27
+<?php else {
28
+    : ?>
28 29
     <h3>Questions you have asked: </h3>
29 30
     <?php foreach ($posts as $post) : ?>
30 31
         <p>
31 32
             <a href="forum/question/<?= $post->id ?>"><?= $post->title ?></a>
32 33
         </p>
33
-    <?php endforeach; ?>
34
+    <?php endforeach;
35
+}
36
+?>
34 37
 <?php endif; ?>
35 38
 <?php if (empty($answers)) : ?>
36 39
     <p>You have not posted any answers yet.</p>
37
-<?php else : ?>
40
+<?php else {
41
+    : ?>
38 42
     <h3>Answers you have posted: </h3>
39 43
     <?php foreach ($answers as $answer) : ?>
40 44
         <a href="forum/question/<?= $answer->question_id ?>"><?= $answer->content ?></a>
41
-    <?php endforeach; ?>
45
+    <?php endforeach;
46
+}
47
+?>
42 48
 <?php endif; ?>
Please login to merge, or discard this patch.
view/forum/specific.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,12 @@
 block discarded – undo
38 38
         <p>
39 39
             <a href="../answer/<?= $item->id ?>">Answer this post</a>
40 40
         </p>
41
-    <?php else : ?>
41
+    <?php else {
42
+    : ?>
42 43
         <p>You have to be logged in to answer on a post!</p>
43
-    <?php endif; ?>
44
+    <?php endif;
45
+}
46
+?>
44 47
     <?php foreach ($answers as $answer) : ?>
45 48
         <h2>Answers:</h2>
46 49
         <?= $filter->doFilter($answer->content, "markdown"); ?>
Please login to merge, or discard this patch.
view/forum/index.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,10 @@
 block discarded – undo
34 34
         <p>
35 35
             <a href="forum/create">Create a new post</a>
36 36
         </p>
37
-    <?php else : ?>
37
+    <?php else {
38
+    : ?>
38 39
         <p>You have to be logged in to create a new post</p>
39
-    <?php endif; ?>
40
+    <?php endif;
41
+}
42
+?>
40 43
 </article>
Please login to merge, or discard this patch.
src/User/User.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@  discard block
 block discarded – undo
6 6
 class User extends ActiveRecordModel
7 7
 {
8 8
     /**
9
-    * @var string $tableName name of the database table.
10
-    */
9
+     * @var string $tableName name of the database table.
10
+     */
11 11
     protected $tableName = "User";
12 12
 
13 13
     /**
14
-    * Columns in the table.
15
-    *
16
-    * @var integer $id primary key auto incremented.
17
-    */
14
+     * Columns in the table.
15
+     *
16
+     * @var integer $id primary key auto incremented.
17
+     */
18 18
     public $id;
19 19
     public $username;
20 20
     public $password;
@@ -27,26 +27,26 @@  discard block
 block discarded – undo
27 27
      * A database driven model.
28 28
      */
29 29
     /**
30
-    * Set the password.
31
-    *
32
-    * @param string $password the password to use.
33
-    *
34
-    * @return void
35
-    */
30
+     * Set the password.
31
+     *
32
+     * @param string $password the password to use.
33
+     *
34
+     * @return void
35
+     */
36 36
     public function setPassword($password)
37 37
     {
38 38
         $this->password = password_hash($password, PASSWORD_DEFAULT);
39 39
     }
40 40
 
41 41
     /**
42
-    * Verify the acronym and the password, if successful the object contains
43
-    * all details from the database row.
44
-    *
45
-    * @param string $acronym  acronym to check.
46
-    * @param string $password the password to use.
47
-    *
48
-    * @return boolean true if acronym and password matches, else false.
49
-    */
42
+     * Verify the acronym and the password, if successful the object contains
43
+     * all details from the database row.
44
+     *
45
+     * @param string $acronym  acronym to check.
46
+     * @param string $password the password to use.
47
+     *
48
+     * @return boolean true if acronym and password matches, else false.
49
+     */
50 50
     public function verifyPassword($username, $password)
51 51
     {
52 52
         $this->find("username", $username);
Please login to merge, or discard this patch.
src/User/HTMLForm/UserLoginForm.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@
 block discarded – undo
83 83
         $session->set("login", $user->id);
84 84
 
85 85
         if (!$res) {
86
-           $this->form->rememberValues();
87
-           $this->form->addOutput("User or password did not match.");
88
-           return false;
86
+            $this->form->rememberValues();
87
+            $this->form->addOutput("User or password did not match.");
88
+            return false;
89 89
         }
90 90
         $this->form->addOutput("User " . $user->username . " logged in.");
91 91
         return true;
Please login to merge, or discard this patch.
src/User/HTMLForm/EditUserForm.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      *
87 87
      * @return boolean true if okey, false if something went wrong.
88 88
      */
89
-     public function callbackSubmit()
89
+        public function callbackSubmit()
90 90
     {
91 91
         // Get values from the submitted form
92 92
         $user = new User();
Please login to merge, or discard this patch.
src/User/HTMLForm/CreateUserForm.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      *
62 62
      * @return boolean true if okey, false if something went wrong.
63 63
      */
64
-     public function callbackSubmit()
64
+        public function callbackSubmit()
65 65
     {
66 66
         // Get values from the submitted form
67 67
         $username      = $this->form->value("username");
Please login to merge, or discard this patch.
src/Controller/ErrorHandlerController.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,6 @@
 block discarded – undo
22 22
      * @param string $message with details.
23 23
      *
24 24
      * @throws Anax\Route\Exception\NotFoundException
25
-
26 25
      * @return object as the response.
27 26
      */
28 27
     public function catchAll() : object
Please login to merge, or discard this patch.