Skip to content

Commit

Permalink
CS Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
endroid committed Oct 19, 2024
1 parent 9bfc8e9 commit 9d2e59e
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/CacheAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(
/** @var array<string> */
private array $tags = [],
private int $expiresAfter = 0,
private bool $clear = false
private bool $clear = false,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/CallbackAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
public function __construct(
/** @var callable */
private mixed $callable
private mixed $callable,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/ControllerAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(
private RequestStack $requestStack,
private string $controller,
/** @var array<mixed> */
private array $controllerParameters = []
private array $controllerParameters = [],
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/DataAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
final readonly class DataAsset extends AbstractAsset
{
public function __construct(
private string $data
private string $data,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Factory/Adapter/AbstractFactoryAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
abstract readonly class AbstractFactoryAdapter implements FactoryAdapterInterface
{
public function __construct(
public int $guesserPriority = 1
public int $guesserPriority = 1,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Factory/Adapter/CacheAssetFactoryAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
public function __construct(
private CacheItemPoolInterface $cache,
private AssetFactory $assetFactory
private AssetFactory $assetFactory,
) {
parent::__construct(0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/Adapter/ControllerAssetFactoryAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
public function __construct(
private HttpKernelInterface $kernel,
private RequestStack $requestStack
private RequestStack $requestStack,
) {
parent::__construct(1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/Adapter/TemplateAssetFactoryAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
final readonly class TemplateAssetFactoryAdapter extends AbstractFactoryAdapter
{
public function __construct(
private Environment $renderer
private Environment $renderer,
) {
parent::__construct(1);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/AssetFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class AssetFactory
public function __construct(
private readonly ClassGuesser $classGuesser = new ClassGuesser(),
/** @var array<string, FactoryAdapterInterface> */
private array $factories = []
private array $factories = [],
) {
}

Expand All @@ -33,7 +33,7 @@ public function addFactory(FactoryAdapterInterface $factory): void
}

/** @param array<mixed> $options */
public function create(string $className = null, array $options = []): AssetInterface
public function create(?string $className = null, array $options = []): AssetInterface
{
if (null === $className) {
$className = $this->classGuesser->guessClassName($options);
Expand Down
2 changes: 1 addition & 1 deletion src/FileAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
final readonly class FileAsset extends AbstractAsset
{
public function __construct(
private string $path
private string $path,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Guesser/ClassGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ final class ClassGuesser
{
public function __construct(
/** @var array<string, FactoryAdapterInterface> */
private array $factories = []
private array $factories = [],
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/MultiUrlAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
public function __construct(
/** @var array<string> */
private array $urls
private array $urls,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/TemplateAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct(
private Environment $templating,
private string $template,
/** @var array<mixed> */
private array $parameters = []
private array $parameters = [],
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/UrlAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
final readonly class UrlAsset extends AbstractAsset
{
public function __construct(
private string $url
private string $url,
) {
}

Expand Down
5 changes: 2 additions & 3 deletions tests/Factory/AssetFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
use Endroid\Asset\DataAsset;
use Endroid\Asset\Factory\Adapter\DataAssetFactoryAdapter;
use Endroid\Asset\Factory\AssetFactory;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;

final class AssetFactoryTest extends TestCase
{
/**
* @testdox Create data asset via factory
*/
#[TestDox('Create data asset via factory')]
public function testFactory(): void
{
$assetFactory = new AssetFactory();
Expand Down

0 comments on commit 9d2e59e

Please sign in to comment.