diff --git a/site/app/Admin/Presenters/ReviewsPresenter.php b/site/app/Admin/Presenters/ReviewsPresenter.php index b70043faa..e4617607d 100644 --- a/site/app/Admin/Presenters/ReviewsPresenter.php +++ b/site/app/Admin/Presenters/ReviewsPresenter.php @@ -24,12 +24,12 @@ public function actionDefault(): void } - public function actionTraining(string $param): void + public function actionTraining(int $param): void { - $training = $this->trainings->getById((int)$param); + $training = $this->trainings->getById($param); $this->template->pageTitle = 'Ohlasy na ' . $training->name; - $this->template->reviews = $this->trainingReviews->getAllReviews((int)$param); + $this->template->reviews = $this->trainingReviews->getAllReviews($param); } } diff --git a/site/app/Admin/Presenters/TalksPresenter.php b/site/app/Admin/Presenters/TalksPresenter.php index f2dbdd998..45d7c3d50 100644 --- a/site/app/Admin/Presenters/TalksPresenter.php +++ b/site/app/Admin/Presenters/TalksPresenter.php @@ -49,10 +49,10 @@ public function renderDefault(): void } - public function actionTalk(string $param): void + public function actionTalk(int $param): void { try { - $this->talk = $this->talks->getById((int)$param); + $this->talk = $this->talks->getById($param); } catch (TalkDoesNotExistException $e) { throw new BadRequestException($e->getMessage(), previous: $e); } @@ -62,10 +62,10 @@ public function actionTalk(string $param): void } - public function actionSlides(string $param): void + public function actionSlides(int $param): void { try { - $this->talk = $this->talks->getById((int)$param); + $this->talk = $this->talks->getById($param); $this->slides = $this->talkSlides->getSlides($this->talk->getId(), $this->talk->getFilenamesTalkId()); } catch (ContentTypeException | TalkDoesNotExistException $e) { throw new BadRequestException($e->getMessage(), previous: $e); diff --git a/site/app/Admin/Presenters/templates/Pulse/passwordsStorages.latte b/site/app/Admin/Presenters/templates/Pulse/passwordsStorages.latte index 927893c4f..b034d49f5 100644 --- a/site/app/Admin/Presenters/templates/Pulse/passwordsStorages.latte +++ b/site/app/Admin/Presenters/templates/Pulse/passwordsStorages.latte @@ -82,7 +82,7 @@ add {$i + 1}. disclosure {formContainer new} - {formContainer $i} + {formContainer "$i"} {label disclosure /}{input disclosure} {label url /}{input url} {label archive /}{input archive} diff --git a/site/app/Admin/Presenters/templates/Talks/slides.latte b/site/app/Admin/Presenters/templates/Talks/slides.latte index d594f15a1..373e8a848 100644 --- a/site/app/Admin/Presenters/templates/Talks/slides.latte +++ b/site/app/Admin/Presenters/templates/Talks/slides.latte @@ -62,7 +62,7 @@ {/formContainer} {formContainer new} {for $i = 0; $i < $newCount; $i++} - {formContainer $i} + {formContainer "$i"} Číslo diff --git a/site/phpstan-latte-templates.neon b/site/phpstan-latte-templates.neon index b1bd52238..bd7f11b93 100644 --- a/site/phpstan-latte-templates.neon +++ b/site/phpstan-latte-templates.neon @@ -2,7 +2,7 @@ parameters: tmpDir: /tmp/phpstan/michalspacek.cz-latte-templates paths: - app - level: 4 + level: 5 latte: engineBootstrap: app/PhpStan/latteEngine.php presenterFactoryBootstrap: app/PhpStan/presenterFactory.php