Completed
Branch master (3028d7)
by Markus
06:24 queued 03:12
created
src/User/HTMLForm/UserLoginForm.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
                 "submit" => [
41 41
                     "type" => "submit",
42 42
                     "value" => "Login",
43
-                    "callback" => [$this, "callbackSubmit"]
43
+                    "callback" => [ $this, "callbackSubmit" ]
44 44
                 ],
45 45
             ]
46 46
         );
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
     public function callbackSubmit()
58 58
     {
59 59
         // Get values from the submitted form
60
-        $username       = $this->form->value("username");
61
-        $password      = $this->form->value("password");
60
+        $username = $this->form->value("username");
61
+        $password = $this->form->value("password");
62 62
 
63 63
         // Try to login
64 64
         // $db = $this->di->get("dbqb");
Please login to merge, or discard this patch.
src/User/HTMLForm/EditUserForm.php 2 patches
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,20 +26,20 @@  discard block
 block discarded – undo
26 26
             [
27 27
                 "id" => [
28 28
                     "type"        => "text",
29
-                    "validation" => ["not_empty"],
29
+                    "validation" => [ "not_empty" ],
30 30
                     "readonly" => "readonly",
31 31
                     "value" => $user->id,
32 32
                 ],
33 33
 
34 34
                 "username" => [
35 35
                     "type"        => "text",
36
-                    "validation" => ["not_empty"],
36
+                    "validation" => [ "not_empty" ],
37 37
                     "value" => $user->username,
38 38
                 ],
39 39
 
40 40
                 "password" => [
41 41
                     "type"        => "password",
42
-                    "validation" => ["not_empty"],
42
+                    "validation" => [ "not_empty" ],
43 43
                 ],
44 44
 
45 45
                 "password-again" => [
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
 
52 52
                 "email" => [
53 53
                     "type"        => "email",
54
-                    "validation" => ["not_empty"],
54
+                    "validation" => [ "not_empty" ],
55 55
                     "value" => $user->email,
56 56
                 ],
57 57
 
58 58
                 "submit" => [
59 59
                     "type" => "submit",
60 60
                     "value" => "Create user",
61
-                    "callback" => [$this, "callbackSubmit"]
61
+                    "callback" => [ $this, "callbackSubmit" ]
62 62
                 ],
63 63
             ]
64 64
         );
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
         $email = $this->form->value("email");
98 98
 
99 99
         // Check password matches
100
-        if ($password !== $passwordAgain ) {
100
+        if ($password !== $passwordAgain) {
101 101
             $this->form->rememberValues();
102 102
             $this->form->addOutput("Password did not match.");
103 103
             return false;
104 104
         }
105 105
 
106 106
         $user->find("id", $this->form->value("id"));
107
-        $user->username  = $this->form->value("username");
107
+        $user->username = $this->form->value("username");
108 108
         $user->password = $this->form->value("password");
109 109
         $user->email = $this->form->value("email");
110 110
         $user->save();
Please login to merge, or discard this patch.
src/User/HTMLForm/CreateUserForm.php 2 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 "submit" => [
48 48
                     "type" => "submit",
49 49
                     "value" => "Create user",
50
-                    "callback" => [$this, "callbackSubmit"]
50
+                    "callback" => [ $this, "callbackSubmit" ]
51 51
                 ],
52 52
             ]
53 53
         );
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $email = $this->form->value("email");
71 71
 
72 72
         // Check password matches
73
-        if ($password !== $passwordAgain ) {
73
+        if ($password !== $passwordAgain) {
74 74
             $this->form->rememberValues();
75 75
             $this->form->addOutput("Password did not match.");
76 76
             return false;
Please login to merge, or discard this patch.
src/Controller/ErrorHandlerController.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,13 +52,13 @@
 block discarded – undo
52 52
         $page->add(
53 53
             "anax/v2/error/default",
54 54
             [
55
-                "header" => $pages[$path][0],
56
-                "text" => $pages[$path][1],
55
+                "header" => $pages[ $path ][ 0 ],
56
+                "text" => $pages[ $path ][ 1 ],
57 57
             ]
58 58
         );
59 59
 
60 60
         return $page->render([
61
-            "title" => $pages[$path][0] . $title
61
+            "title" => $pages[ $path ][ 0 ] . $title
62 62
         ], $path);
63 63
     }
64 64
 }
Please login to merge, or discard this patch.
src/Controller/SampleJsonController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $json = [
59 59
             "message" => __METHOD__ . ", \$db is {$this->db}",
60 60
         ];
61
-        return [$json];
61
+        return [ $json ];
62 62
     }
63 63
 
64 64
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             "message" => __METHOD__ . "<p>\$di contains: $services",
78 78
             "di" => $this->di->getServices(),
79 79
         ];
80
-        return [$json];
80
+        return [ $json ];
81 81
     }
82 82
 
83 83
 
@@ -94,6 +94,6 @@  discard block
 block discarded – undo
94 94
         $json = [
95 95
             "message" => __METHOD__ . ", forbidden to access.",
96 96
         ];
97
-        return [$json, 403];
97
+        return [ $json, 403 ];
98 98
     }
99 99
 }
Please login to merge, or discard this patch.
src/Controller/FlatFileContentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         $content = file_get_contents($file);
50 50
         $content = $this->di->get("textfilter")->parse(
51 51
             $content,
52
-            ["frontmatter", "variable", "shortcode", "markdown", "titlefromheader"]
52
+            [ "frontmatter", "variable", "shortcode", "markdown", "titlefromheader" ]
53 53
         );
54 54
 
55 55
         // Add content as a view and then render the page
Please login to merge, or discard this patch.
src/Controller/DevelopmentController.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
21 21
      * @param array $args as a variadic to catch all arguments.
22 22
      *
23 23
      * @throws Anax\Route\Exception\NotFoundException when route is not found.
24
-
25 24
      * @return object as the response.
26 25
      *
27 26
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,14 +47,14 @@
 block discarded – undo
47 47
 
48 48
         $page = $this->di->get("page");
49 49
         $page->add(
50
-            "anax/v2/dev/{$pages[$path]}",
50
+            "anax/v2/dev/{$pages[ $path ]}",
51 51
             [
52 52
                 "mount" => "dev/"
53 53
             ]
54 54
         );
55 55
 
56 56
         return $page->render([
57
-            "title" => ucfirst($pages[$path]),
57
+            "title" => ucfirst($pages[ $path ]),
58 58
             "baseTitle" => " | Anax development utilities"
59 59
         ]);
60 60
     }
Please login to merge, or discard this patch.
src/Forum/Answer.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 class Answer 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 = "Svar";
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 $content;
20 20
     public $question_id;
Please login to merge, or discard this patch.
src/Forum/HTMLForm/AnswerForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                 "submit" => [
51 51
                     "type" => "submit",
52 52
                     "value" => "Answer",
53
-                    "callback" => [$this, "callbackSubmit"]
53
+                    "callback" => [ $this, "callbackSubmit" ]
54 54
                 ],
55 55
             ]
56 56
         );
Please login to merge, or discard this patch.