Skip to content

Commit

Permalink
Keep Scrutinizr happy-ish
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Mar 28, 2024
1 parent ba7e754 commit 2503102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/CacheFlag.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private function _maybeInvalidateFlaggedCachesByElement(?ElementInterface $eleme
} catch (\Throwable) {
// We don't care about handling this exception
}
CacheFlag::getInstance()->cacheFlag->invalidateFlaggedCachesByElement($element);
$this->cacheFlag->invalidateFlaggedCachesByElement($element);
}

}
10 changes: 5 additions & 5 deletions src/services/CacheFlagService.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ public function getAllFlags(): array
}

/**
* @param string|string[] $flags
* @param string|string[]|null $flags
* @param string $sourceColumn
* @param string $sourceValue
* @throws \Throwable
* @throws \yii\db\Exception
*/
public function saveFlags($flags, string $sourceColumn, string $sourceValue)
public function saveFlags(string|array|null $flags, string $sourceColumn, string $sourceValue): void
{

if (!$flags) {
if (empty($flags)) {
return;
}

if (\is_array($flags)) {
$flags = \implode(',', $flags);
if (is_array($flags)) {
$flags = implode(',', $flags);
}

$uid = (new Query())
Expand Down

0 comments on commit 2503102

Please sign in to comment.