Skip to content

Commit

Permalink
[Cache] Coding standard fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiří Bok committed Apr 23, 2024
1 parent e21cf28 commit 14fd937
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Adapter/AbstractAdapter.php
Expand Up @@ -42,7 +42,7 @@ abstract class AbstractAdapter implements AdapterInterface, CacheInterface, Logg

protected function __construct(string $namespace = '', int $defaultLifetime = 0)
{
if (static::$reservedChars === null) {
if (null === static::$reservedChars) {
static::$reservedChars = str_replace(self::NS_SEPARATOR, '', CacheItem::RESERVED_CHARACTERS);
}
$this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace, static::$reservedChars).static::NS_SEPARATOR;
Expand Down
Expand Up @@ -49,7 +49,7 @@ abstract class AbstractTagAwareAdapter implements TagAwareAdapterInterface, TagA

protected function __construct(string $namespace = '', int $defaultLifetime = 0)
{
if (static::$reservedChars === null) {
if (null === static::$reservedChars) {
static::$reservedChars = str_replace(self::NS_SEPARATOR, '', CacheItem::RESERVED_CHARACTERS);
}
$this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace, static::$reservedChars).static::NS_SEPARATOR;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Adapter/ArrayAdapter.php
Expand Up @@ -55,7 +55,7 @@ public function __construct(
private float $maxLifetime = 0,
private int $maxItems = 0,
) {
if (static::$reservedChars === null) {
if (null === static::$reservedChars) {
static::$reservedChars = str_replace(self::NS_SEPARATOR, '', CacheItem::RESERVED_CHARACTERS);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/CacheItem.php
Expand Up @@ -123,7 +123,7 @@ public function getMetadata(): array
/**
* Validates a cache key according to PSR-6.
*
* @param mixed $key The key to validate
* @param mixed $key The key to validate
* @param string $reservedChars Can be used to override the list of reserved characters
*
* @throws InvalidArgumentException When $key is not valid
Expand Down

0 comments on commit 14fd937

Please sign in to comment.