aboutsummaryrefslogtreecommitdiff
path: root/app/class/Modeltimeline.php
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2020-04-24 16:36:12 +0200
committerVincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com>2020-04-25 17:44:38 +0200
commit385b3f4adf86606e03941171c136d8f2eb2b35c2 (patch)
tree2231cf04d67a5cae7284364ac5552a321b9a236e /app/class/Modeltimeline.php
parent03d425bdd9a639446ae72ce6556d753f2f162f83 (diff)
downloadwcms-385b3f4adf86606e03941171c136d8f2eb2b35c2.tar.gz
wcms-385b3f4adf86606e03941171c136d8f2eb2b35c2.zip
fix: most of PHPStan errors
Diffstat (limited to 'app/class/Modeltimeline.php')
-rw-r--r--app/class/Modeltimeline.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/class/Modeltimeline.php b/app/class/Modeltimeline.php
index db9c4f5..be80211 100644
--- a/app/class/Modeltimeline.php
+++ b/app/class/Modeltimeline.php
@@ -19,7 +19,7 @@ class Modeltimeline extends Modeldb
public function get(int $id)
{
- $eventdata = $this->repo->findById($id);
+ $eventdata = $this->repo->findById("$id");
if ($eventdata !== false) {
return new Event($eventdata);
} else {
@@ -62,7 +62,7 @@ class Modeltimeline extends Modeldb
/**
* Store event
*
- * @param Event The event to be stored in the repositery
+ * @param Event $event The event to be stored in the repositery
*
* @return bool retrun true if it works, false if it fails
*/
@@ -97,6 +97,7 @@ class Modeltimeline extends Modeldb
$id = 0;
$subid = 0;
$lastuser = null;
+ $groupedevents = [];
foreach ($events as $event) {
if ($event->user() !== $lastuser) {
$subid = 0;