Skip to content

Commit f27cd3e

Browse files
committed
CS
1 parent 258d575 commit f27cd3e

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

src/ClassBoundCacheContract.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<?php
22

3+
declare(strict_types=1);
34

45
namespace TheCodingMachine\CacheUtils;
56

67
use ReflectionClass;
78

89
class ClassBoundCacheContract implements ClassBoundCacheContractInterface
910
{
10-
/**
11-
* @var ClassBoundCacheInterface
12-
*/
11+
/** @var ClassBoundCacheInterface */
1312
private $classBoundCache;
1413

1514
public function __construct(ClassBoundCacheInterface $classBoundCache)
@@ -18,14 +17,13 @@ public function __construct(ClassBoundCacheInterface $classBoundCache)
1817
}
1918

2019
/**
21-
* @param ReflectionClass $reflectionClass
22-
* @param callable $resolver
23-
* @param string|null $key An optional key to differentiate between cache items attached to the same class.
20+
* @param string $key An optional key to differentiate between cache items attached to the same class.
21+
*
2422
* @return mixed
2523
*/
2624
public function get(ReflectionClass $reflectionClass, callable $resolver, string $key = '')
2725
{
28-
$cacheKey = $reflectionClass->getName().'__'.$key;
26+
$cacheKey = $reflectionClass->getName() . '__' . $key;
2927
$item = $this->classBoundCache->get($cacheKey);
3028
if ($item !== null) {
3129
return $item;

src/ClassBoundCacheContractInterface.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace TheCodingMachine\CacheUtils;
46

57
use ReflectionClass;
68

79
interface ClassBoundCacheContractInterface
810
{
911
/**
10-
* @param ReflectionClass $reflectionClass
11-
* @param callable $resolver
12-
* @param string|null $key An optional key to differentiate between cache items attached to the same class.
12+
* @param string $key An optional key to differentiate between cache items attached to the same class.
13+
*
1314
* @return mixed
1415
*/
1516
public function get(ReflectionClass $reflectionClass, callable $resolver, string $key = '');

0 commit comments

Comments
 (0)