Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NGSTACK-804 fix view cacheable method signature #159

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading