@@ -61,7 +61,7 @@ |
||
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"); |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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; |
@@ -22,7 +22,6 @@ |
||
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 |
@@ -52,13 +52,13 @@ |
||
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 | } |
@@ -58,7 +58,7 @@ discard block |
||
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 |
||
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 |
||
94 | 94 | $json = [ |
95 | 95 | "message" => __METHOD__ . ", forbidden to access.", |
96 | 96 | ]; |
97 | - return [$json, 403]; |
|
97 | + return [ $json, 403 ]; |
|
98 | 98 | } |
99 | 99 | } |
@@ -49,7 +49,7 @@ |
||
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 |
@@ -21,7 +21,6 @@ |
||
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) |
@@ -47,14 +47,14 @@ |
||
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 | } |
@@ -6,15 +6,15 @@ |
||
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; |
@@ -50,7 +50,7 @@ |
||
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 | ); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | "submit" => [ |
50 | 50 | "type" => "submit", |
51 | 51 | "value" => "Skapa inlägg", |
52 | - "callback" => [$this, "callbackSubmit"] |
|
52 | + "callback" => [ $this, "callbackSubmit" ] |
|
53 | 53 | ], |
54 | 54 | ] |
55 | 55 | ); |
@@ -75,7 +75,7 @@ |
||
75 | 75 | * |
76 | 76 | * @return boolean true if okey, false if something went wrong. |
77 | 77 | */ |
78 | - public function callbackSubmit() |
|
78 | + public function callbackSubmit() |
|
79 | 79 | { |
80 | 80 | // Get values from the submitted form |
81 | 81 | $login = $this->di->get("session")->get("login"); |
@@ -6,15 +6,15 @@ |
||
6 | 6 | class Forum 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 = "Forum"; |
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 $title; |
20 | 20 | public $content; |