Skip to content

Commit ca6aade

Browse files
#4 Apply quality stack
1 parent 59f98ff commit ca6aade

File tree

9 files changed

+84
-31
lines changed

9 files changed

+84
-31
lines changed

src/Adapter/Adapter.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the CleverAge/CacheProcessBundle package.
7+
*
8+
* Copyright (c) Clever-Age
9+
*
10+
* For the full copyright and license information, please view the LICENSE
11+
* file that was distributed with this source code.
12+
*/
13+
514
namespace CleverAge\CacheProcessBundle\Adapter;
615

716
use Psr\Cache\CacheItemInterface;
@@ -12,7 +21,8 @@ class Adapter implements AdapterInterface
1221
public function __construct(
1322
private readonly \Symfony\Component\Cache\Adapter\AdapterInterface $adapter,
1423
private readonly string $code,
15-
) {}
24+
) {
25+
}
1626

1727
public function getCode(): string
1828
{

src/Adapter/AdapterInterface.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the CleverAge/CacheProcessBundle package.
7+
*
8+
* Copyright (c) Clever-Age
9+
*
10+
* For the full copyright and license information, please view the LICENSE
11+
* file that was distributed with this source code.
12+
*/
13+
514
namespace CleverAge\CacheProcessBundle\Adapter;
615

716
interface AdapterInterface extends \Symfony\Component\Cache\Adapter\AdapterInterface

src/CleverAgeCacheProcessBundle.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
<?php declare(strict_types=1);
2-
/**
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
36
* This file is part of the CleverAge/CacheProcessBundle package.
47
*
5-
* Copyright (C) 2017-2019 Clever-Age
8+
* Copyright (c) Clever-Age
69
*
710
* For the full copyright and license information, please view the LICENSE
811
* file that was distributed with this source code.

src/DependencyInjection/CleverAgeCacheProcessExtension.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
<?php declare(strict_types=1);
2-
/**
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
36
* This file is part of the CleverAge/CacheProcessBundle package.
47
*
5-
* Copyright (C) 2017-2019 Clever-Age
8+
* Copyright (c) Clever-Age
69
*
710
* For the full copyright and license information, please view the LICENSE
811
* file that was distributed with this source code.

src/Exception/MissingAdapterException.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the CleverAge/CacheProcessBundle package.
7+
*
8+
* Copyright (c) Clever-Age
9+
*
10+
* For the full copyright and license information, please view the LICENSE
11+
* file that was distributed with this source code.
12+
*/
13+
514
namespace CleverAge\CacheProcessBundle\Exception;
615

716
/**
817
* Exception thrown when trying to fetch a missing Cache Adapter.
918
*/
10-
class MissingAdapterException extends \Exception {}
19+
class MissingAdapterException extends \Exception
20+
{
21+
}

src/Registry/AdapterRegistry.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the CleverAge/CacheProcessBundle package.
7+
*
8+
* Copyright (c) Clever-Age
9+
*
10+
* For the full copyright and license information, please view the LICENSE
11+
* file that was distributed with this source code.
12+
*/
13+
514
namespace CleverAge\CacheProcessBundle\Registry;
615

716
use CleverAge\CacheProcessBundle\Adapter\AdapterInterface;

src/Task/AbstractCacheTask.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
4+
25
/*
3-
* This file is part of the CleverAge/ProcessBundle package.
6+
* This file is part of the CleverAge/CacheProcessBundle package.
47
*
5-
* Copyright (C) 2017-2019 Clever-Age
8+
* Copyright (c) Clever-Age
69
*
710
* For the full copyright and license information, please view the LICENSE
811
* file that was distributed with this source code.
@@ -19,7 +22,9 @@
1922

2023
abstract class AbstractCacheTask extends AbstractConfigurableTask
2124
{
22-
public function __construct(protected AdapterRegistry $registry) {}
25+
public function __construct(protected AdapterRegistry $registry)
26+
{
27+
}
2328

2429
/**
2530
* @throws UndefinedOptionsException
@@ -33,8 +38,12 @@ protected function configureOptions(OptionsResolver $resolver): void
3338
$resolver->setAllowedTypes('key', ['string']);
3439
}
3540

41+
/**
42+
* @return array<mixed>
43+
*/
3644
protected function getMergedOptions(ProcessState $state): array
3745
{
46+
/** @var array<mixed> $options */
3847
$options = $this->getOptions($state);
3948

4049
/** @var array<mixed> $input */

src/Task/GetTask.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the CleverAge/CacheProcessBundle package.
7+
*
8+
* Copyright (c) Clever-Age
9+
*
10+
* For the full copyright and license information, please view the LICENSE
11+
* file that was distributed with this source code.
12+
*/
13+
514
namespace CleverAge\CacheProcessBundle\Task;
615

716
use CleverAge\ProcessBundle\Model\ProcessState;
8-
use Symfony\Component\OptionsResolver\Exception\AccessException;
9-
use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException;
10-
use Symfony\Component\OptionsResolver\OptionsResolver;
1117

1218
/**
1319
* @phpstan-type Options array{
@@ -22,14 +28,6 @@ class GetTask extends AbstractCacheTask
2228
*/
2329
public function execute(ProcessState $state): void
2430
{
25-
// /** @var Options $options */
26-
// $options = $this->getOptions($state);
27-
//
28-
// /** @var array<mixed> $input */
29-
// $input = $state->getInput() ?: [];
30-
//
31-
// /** @var Options $mergedOptions */
32-
// $mergedOptions = array_merge($options, $input);
3331
/** @var Options $mergedOptions */
3432
$mergedOptions = $this->getMergedOptions($state);
3533

src/Task/SetTask.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the CleverAge/CacheProcessBundle package.
7+
*
8+
* Copyright (c) Clever-Age
9+
*
10+
* For the full copyright and license information, please view the LICENSE
11+
* file that was distributed with this source code.
12+
*/
13+
514
namespace CleverAge\CacheProcessBundle\Task;
615

716
use CleverAge\ProcessBundle\Model\ProcessState;
@@ -23,14 +32,6 @@ class SetTask extends AbstractCacheTask
2332
*/
2433
public function execute(ProcessState $state): void
2534
{
26-
// /** @var Options $options */
27-
// $options = $this->getOptions($state);
28-
//
29-
// /** @var array<mixed> $input */
30-
// $input = $state->getInput() ?: [];
31-
//
32-
// /** @var Options $mergedOptions */
33-
// $mergedOptions = array_merge($options, $input);
3435
/** @var Options $mergedOptions */
3536
$mergedOptions = $this->getMergedOptions($state);
3637

0 commit comments

Comments
 (0)