Skip to content

Commit

Permalink
Merge pull request #159 from netgen/NGSTACK-804-fix-cacheable-method-…
Browse files Browse the repository at this point in the history
…signature

NGSTACK-804 fix view cacheable method signature
  • Loading branch information
emodric authored Nov 6, 2023
2 parents 57caf58 + 4794265 commit 7b67036
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion bundle/View/CacheableView.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions bundle/View/TagView.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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#'
Expand Down

0 comments on commit 7b67036

Please sign in to comment.