From 1c4182d9d88bb4471f86b08329f1b68a5290872b Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Fri, 17 Apr 2020 20:58:27 +0200 Subject: apply psr 12 part 2 --- app/class/Controllertimeline.php | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'app/class/Controllertimeline.php') diff --git a/app/class/Controllertimeline.php b/app/class/Controllertimeline.php index 8fc40d2..e856f40 100644 --- a/app/class/Controllertimeline.php +++ b/app/class/Controllertimeline.php @@ -9,9 +9,10 @@ class Controllertimeline extends Controller */ protected $eventmanager; - public function __construct($render) { + public function __construct($render) + { parent::__construct($render); - $this->eventmanager = new Modeltimeline; + $this->eventmanager = new Modeltimeline(); } public function desktop() @@ -21,13 +22,11 @@ class Controllertimeline extends Controller $groupedeventlist = $this->eventmanager->group($eventlist); $this->showtemplate('timeline', ['eventlist' => $eventlist, 'groupedeventlist' => $groupedeventlist]); - } public function add() { - if($this->user->level() >= Modeluser::EDITOR && !empty($_POST['message'])) { - + if ($this->user->level() >= Modeluser::EDITOR && !empty($_POST['message'])) { $event = new Event($_POST); $event->stamp(); $event->setid($this->eventmanager->getlastfreeid()); @@ -38,21 +37,11 @@ class Controllertimeline extends Controller public function clap() { - if(isset($_POST['id']) && isset($_POST['clap'])) { + if (isset($_POST['id']) && isset($_POST['clap'])) { $event = $this->eventmanager->get(intval($_POST['id'])); $event->addclap(); $this->eventmanager->add($event); } $this->routedirect('timeline'); - } } - - - - - - - - -?> \ No newline at end of file -- cgit v1.2.3