@@ -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; |
@@ -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 |
@@ -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 | } |
@@ -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 | ); |
@@ -27,28 +27,28 @@ discard block |
||
| 27 | 27 | [ |
| 28 | 28 | "Titel" => [ |
| 29 | 29 | "type" => "text", |
| 30 | - "validation" => ["not_empty"], |
|
| 30 | + "validation" => [ "not_empty" ], |
|
| 31 | 31 | ], |
| 32 | 32 | |
| 33 | 33 | "Beskrivning" => [ |
| 34 | 34 | "type" => "text", |
| 35 | - "validation" => ["not_empty"], |
|
| 35 | + "validation" => [ "not_empty" ], |
|
| 36 | 36 | ], |
| 37 | 37 | |
| 38 | 38 | "Författare" => [ |
| 39 | 39 | "type" => "text", |
| 40 | - "validation" => ["not_empty"], |
|
| 40 | + "validation" => [ "not_empty" ], |
|
| 41 | 41 | ], |
| 42 | 42 | |
| 43 | 43 | "Bild" => [ |
| 44 | 44 | "type" => "text", |
| 45 | - "validation" => ["not_empty"], |
|
| 45 | + "validation" => [ "not_empty" ], |
|
| 46 | 46 | ], |
| 47 | 47 | |
| 48 | 48 | "submit" => [ |
| 49 | 49 | "type" => "submit", |
| 50 | 50 | "value" => "Create item", |
| 51 | - "callback" => [$this, "callbackSubmit"] |
|
| 51 | + "callback" => [ $this, "callbackSubmit" ] |
|
| 52 | 52 | ], |
| 53 | 53 | ] |
| 54 | 54 | ); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | $book = new Book(); |
| 68 | 68 | $book->setDb($this->di->get("dbqb")); |
| 69 | - $book->column1 = $this->form->value("Titel"); |
|
| 69 | + $book->column1 = $this->form->value("Titel"); |
|
| 70 | 70 | $book->column2 = $this->form->value("Beskrivning"); |
| 71 | 71 | $book->column3 = $this->form->value("Författare"); |
| 72 | 72 | $book->column4 = $this->form->value("Bild"); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | "submit" => [ |
| 35 | 35 | "type" => "submit", |
| 36 | 36 | "value" => "Delete item", |
| 37 | - "callback" => [$this, "callbackSubmit"] |
|
| 37 | + "callback" => [ $this, "callbackSubmit" ] |
|
| 38 | 38 | ], |
| 39 | 39 | ] |
| 40 | 40 | ); |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | $book = new Book(); |
| 53 | 53 | $book->setDb($this->di->get("dbqb")); |
| 54 | 54 | |
| 55 | - $books = ["-1" => "Select an item..."]; |
|
| 55 | + $books = [ "-1" => "Select an item..." ]; |
|
| 56 | 56 | foreach ($book->findAll() as $obj) { |
| 57 | - $books[$obj->id] = "{$obj->column1} ({$obj->id})"; |
|
| 57 | + $books[ $obj->id ] = "{$obj->column1} ({$obj->id})"; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | return $books; |