diff --git a/bundle/View/CacheableView.php b/bundle/View/CacheableView.php index 2ffb1af5..6a8f5b9b 100644 --- a/bundle/View/CacheableView.php +++ b/bundle/View/CacheableView.php @@ -8,8 +8,10 @@ interface CacheableView { /** * Sets the cache as enabled/disabled. + * + * @param bool $cacheEnabled */ - public function setCacheEnabled(bool $cacheEnabled): void; + public function setCacheEnabled($cacheEnabled): void; /** * Indicates if cache is enabled or not. diff --git a/bundle/View/TagView.php b/bundle/View/TagView.php index 257faf5a..1c86d166 100644 --- a/bundle/View/TagView.php +++ b/bundle/View/TagView.php @@ -23,9 +23,9 @@ public function getTag(): Tag return $this->tag; } - public function setCacheEnabled(bool $cacheEnabled): void + public function setCacheEnabled($cacheEnabled): void { - $this->isCacheEnabled = $cacheEnabled; + $this->isCacheEnabled = (bool) $cacheEnabled; } public function isCacheEnabled(): bool diff --git a/phpstan.neon b/phpstan.neon index 62b00f57..face67bb 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -36,6 +36,7 @@ parameters: - "#Casting to int something that's already int.#" - '#should be contravariant with parameter#' - '#should be covariant with return type#' + - "#Casting to bool something that's already bool.#" # Errors caused by Ibexa Elasticsearch - '#Ibexa\\Contracts\\Elasticsearch#'