@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $db = $di->get("dbqb"); |
| 48 | 48 | $db->connect() |
| 49 | - ->insert("Comments", ["questionId", "acronym", "comment", "points", "created"]) |
|
| 50 | - ->execute([$this->questionId, $this->acronym, $this->comment, $this->points, $this->created]); |
|
| 49 | + ->insert("Comments", [ "questionId", "acronym", "comment", "points", "created" ]) |
|
| 50 | + ->execute([ $this->questionId, $this->acronym, $this->comment, $this->points, $this->created ]); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $db = $di->get("dbqb"); |
| 64 | 64 | $db->connect() |
| 65 | - ->insert("AnswerComments", ["answerId", "acronym", "comment", "points", "created"]) |
|
| 66 | - ->execute([$this->answerId, $this->acronym, $this->comment, $this->points, $this->created]); |
|
| 65 | + ->insert("AnswerComments", [ "answerId", "acronym", "comment", "points", "created" ]) |
|
| 66 | + ->execute([ $this->answerId, $this->acronym, $this->comment, $this->points, $this->created ]); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | |
@@ -56,10 +56,10 @@ |
||
| 56 | 56 | $db = $di->get("dbqb"); |
| 57 | 57 | $db->connect(); |
| 58 | 58 | $res = $db->select("name") |
| 59 | - ->from("Pictures") |
|
| 60 | - ->where("acronym = ?") |
|
| 61 | - ->execute(["default"]) |
|
| 62 | - ->fetchAll(); |
|
| 59 | + ->from("Pictures") |
|
| 60 | + ->where("acronym = ?") |
|
| 61 | + ->execute(["default"]) |
|
| 62 | + ->fetchAll(); |
|
| 63 | 63 | |
| 64 | 64 | $array = []; |
| 65 | 65 | foreach ($res as $val) { |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | $res = $db->select("name") |
| 59 | 59 | ->from("Pictures") |
| 60 | 60 | ->where("acronym = ?") |
| 61 | - ->execute(["default"]) |
|
| 61 | + ->execute([ "default" ]) |
|
| 62 | 62 | ->fetchAll(); |
| 63 | 63 | |
| 64 | - $array = []; |
|
| 64 | + $array = [ ]; |
|
| 65 | 65 | foreach ($res as $val) { |
| 66 | 66 | // var_dump($val->name); |
| 67 | 67 | array_push($array, $val->name); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | $pic = array_rand($array, 1); |
| 72 | 72 | // var_dump($array[$pic]); |
| 73 | - $this->picture = $array[$pic]; |
|
| 73 | + $this->picture = $array[ $pic ]; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | { |
| 105 | 105 | $db = $di->get("dbqb"); |
| 106 | 106 | $db->connect() |
| 107 | - ->insert("User", ["acronym", "password", "picture", "points", "created"]) |
|
| 108 | - ->execute([$this->acronym, $this->password, $this->picture, $this->points, $this->created]); |
|
| 107 | + ->insert("User", [ "acronym", "password", "picture", "points", "created" ]) |
|
| 108 | + ->execute([ $this->acronym, $this->password, $this->picture, $this->points, $this->created ]); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | |