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

Aktualisiere PHP-CS-Fixer auf v3.62.0 #48

Merged
merged 2 commits into from
Aug 26, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/fix-cs-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Run PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:3.11.0
uses: docker://ghcr.io/webfactory/php-cs-fixer:3.62.0

- name: Commit and push back changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
2 changes: 1 addition & 1 deletion src/Caching/Attribute/Send304IfNotModified.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(...$values)
);

if (!$values) {
throw new InvalidArgumentException(sprintf('The %s attribute needs at least one criterion', __CLASS__));
throw new InvalidArgumentException(\sprintf('The %s attribute needs at least one criterion', __CLASS__));
}

$this->lastmodHelper = new LastmodHelper();
Expand Down
1 change: 1 addition & 0 deletions src/Caching/WfdMetaQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* )
*
* becomes (without the spaces behind the "@"s):
*
* @ ReplaceWithNotModifiedResponse({"@ app_caching_mycontroller_myaction"})
*
* with the following service definition:
Expand Down
2 changes: 1 addition & 1 deletion src/Config/WfdMetaConfigCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function isWfdMetaFresh(): bool
return $metaQuery->getLastTouched() === $wfdMetaResources['timestamp'];
}

public function write($content, array $metadata = null): void
public function write($content, ?array $metadata = null): void
{
$this->innerCache->write($content, $metadata);

Expand Down
2 changes: 1 addition & 1 deletion src/Config/WfdMetaConfigCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(ConfigCacheFactoryInterface $configCacheFactory, Met
public function cache($file, $callback): ConfigCacheInterface
{
if (!\is_callable($callback)) {
throw new InvalidArgumentException(sprintf('Invalid type for callback argument. Expected callable, but got "%s".', \gettype($callback)));
throw new InvalidArgumentException(\sprintf('Invalid type for callback argument. Expected callable, but got "%s".', \gettype($callback)));
}

$wfdMetaCache = null;
Expand Down
2 changes: 1 addition & 1 deletion src/DoctrineMetadataHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getRootTableName(string $classname): string
public function getPrimaryKey($entity)
{
/** @var $meta ClassMetadata */
$meta = $this->metadataFactory->getMetadataFor(\get_class($entity));
$meta = $this->metadataFactory->getMetadataFor($entity::class);

return $meta->getFieldValue($entity, $meta->getSingleIdentifierFieldName());
}
Expand Down
4 changes: 2 additions & 2 deletions src/MetadataFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MetadataFacade
/**
* MetadataFacade constructor.
*/
public function __construct(Provider $provider, DoctrineMetadataHelper $doctrineMetadataHelper = null)
public function __construct(Provider $provider, ?DoctrineMetadataHelper $doctrineMetadataHelper = null)
{
$this->provider = $provider;
$this->doctrineMetadataHelper = $doctrineMetadataHelper;
Expand All @@ -37,7 +37,7 @@ public function getLastTouchedForEntity($entity)
}

return $this->provider->getLastTouchedRow(
$this->doctrineMetadataHelper->getRootTableName(\get_class($entity)),
$this->doctrineMetadataHelper->getRootTableName($entity::class),
$this->doctrineMetadataHelper->getPrimaryKey($entity)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Util/CriticalSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class CriticalSection
*
* The lock name is used as key.
*
* @var array<string, integer>
* @var array<string, int>
*/
private static $entranceCount = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Util/ExpirableConfigCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct($baseFilename, $debug, $timestamp)
parent::__construct($this->timestampedFile, $debug);
}

public function write(string $content, array $metadata = null): void
public function write(string $content, ?array $metadata = null): void
{
parent::write($content, $metadata);

Expand Down