From ea9b0d282374f65740da7e9b2a3ac5eebf09b7ac Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Wed, 22 Nov 2023 10:29:45 +0000 Subject: [PATCH] Update ImageColumn.php --- packages/tables/src/Columns/ImageColumn.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/tables/src/Columns/ImageColumn.php b/packages/tables/src/Columns/ImageColumn.php index ac5bb617de..b2e4e53e02 100644 --- a/packages/tables/src/Columns/ImageColumn.php +++ b/packages/tables/src/Columns/ImageColumn.php @@ -50,7 +50,7 @@ class ImageColumn extends Column protected string | Closure | null $limitedRemainingTextSize = null; - protected bool | Closure $shouldFetchFileExistence = true; + protected bool | Closure $shouldCheckFileExistence = true; public function disk(string | Closure | null $disk): static { @@ -151,7 +151,7 @@ class ImageColumn extends Column /** @var FilesystemAdapter $storage */ $storage = $this->getDisk(); - if ($this->shouldFetchFileExistence()) { + if ($this->shouldCheckFileExistence()) { try { if (! $storage->exists($state)) { return null; @@ -337,15 +337,15 @@ class ImageColumn extends Column return $this->evaluate($this->limitedRemainingTextSize); } - public function shouldFetchFileExistence(): bool + public function checkFileExistence(bool | Closure $condition = true): static { - return (bool) $this->evaluate($this->shouldFetchFileExistence); - } - - public function fetchFileExistence(bool | Closure $condition = true): static - { - $this->shouldFetchFileExistence = $condition; + $this->shouldCheckFileExistence = $condition; return $this; } + + public function shouldCheckFileExistence(): bool + { + return (bool) $this->evaluate($this->shouldCheckFileExistence); + } }