@@ -21,49 +21,49 @@ |
||
21 | 21 | |
22 | 22 | trait ClusterPoolTrait |
23 | 23 | { |
24 | - protected function driverCheck(): bool |
|
25 | - { |
|
26 | - return true; |
|
27 | - } |
|
24 | + protected function driverCheck(): bool |
|
25 | + { |
|
26 | + return true; |
|
27 | + } |
|
28 | 28 | |
29 | - protected function driverConnect(): bool |
|
30 | - { |
|
31 | - return true; |
|
32 | - } |
|
29 | + protected function driverConnect(): bool |
|
30 | + { |
|
31 | + return true; |
|
32 | + } |
|
33 | 33 | |
34 | - /** |
|
35 | - * @param ExtendedCacheItemInterface $item |
|
36 | - * @return ?array<string, mixed> |
|
37 | - */ |
|
38 | - protected function driverRead(ExtendedCacheItemInterface $item): ?array |
|
39 | - { |
|
40 | - return null; |
|
41 | - } |
|
34 | + /** |
|
35 | + * @param ExtendedCacheItemInterface $item |
|
36 | + * @return ?array<string, mixed> |
|
37 | + */ |
|
38 | + protected function driverRead(ExtendedCacheItemInterface $item): ?array |
|
39 | + { |
|
40 | + return null; |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * @param ExtendedCacheItemInterface $item |
|
45 | - * @return bool |
|
46 | - */ |
|
47 | - protected function driverWrite(ExtendedCacheItemInterface $item): bool |
|
48 | - { |
|
49 | - return true; |
|
50 | - } |
|
43 | + /** |
|
44 | + * @param ExtendedCacheItemInterface $item |
|
45 | + * @return bool |
|
46 | + */ |
|
47 | + protected function driverWrite(ExtendedCacheItemInterface $item): bool |
|
48 | + { |
|
49 | + return true; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @param string $key |
|
54 | - * @param string $encodedKey |
|
55 | - * @return bool |
|
56 | - */ |
|
57 | - protected function driverDelete(string $key, string $encodedKey): bool |
|
58 | - { |
|
59 | - return true; |
|
60 | - } |
|
52 | + /** |
|
53 | + * @param string $key |
|
54 | + * @param string $encodedKey |
|
55 | + * @return bool |
|
56 | + */ |
|
57 | + protected function driverDelete(string $key, string $encodedKey): bool |
|
58 | + { |
|
59 | + return true; |
|
60 | + } |
|
61 | 61 | |
62 | - /** |
|
63 | - * @return bool |
|
64 | - */ |
|
65 | - protected function driverClear(): bool |
|
66 | - { |
|
67 | - return true; |
|
68 | - } |
|
62 | + /** |
|
63 | + * @return bool |
|
64 | + */ |
|
65 | + protected function driverClear(): bool |
|
66 | + { |
|
67 | + return true; |
|
68 | + } |
|
69 | 69 | } |
@@ -20,37 +20,37 @@ |
||
20 | 20 | |
21 | 21 | class EventReferenceParameter |
22 | 22 | { |
23 | - public function __construct(protected mixed &$parameter, protected bool $allowTypeChange = false) |
|
24 | - { |
|
25 | - } |
|
26 | - |
|
27 | - public function getParameterValue(): mixed |
|
28 | - { |
|
29 | - return $this->parameter; |
|
30 | - } |
|
31 | - |
|
32 | - /** |
|
33 | - * @throws PhpfastcacheInvalidTypeException |
|
34 | - */ |
|
35 | - public function setParameterValue(mixed $newValue): void |
|
36 | - { |
|
37 | - if (!$this->allowTypeChange) { |
|
38 | - $currentType = \gettype($this->parameter); |
|
39 | - $newType = \gettype($newValue); |
|
40 | - if ($newType !== $currentType) { |
|
41 | - throw new PhpfastcacheInvalidTypeException(\sprintf( |
|
42 | - 'You tried to change the variable type from "%s" to "%s", which is not allowed.', |
|
43 | - $currentType, |
|
44 | - $newType |
|
45 | - )); |
|
46 | - } |
|
47 | - } |
|
48 | - |
|
49 | - $this->parameter = $newValue; |
|
50 | - } |
|
51 | - |
|
52 | - public function __invoke(): mixed |
|
53 | - { |
|
54 | - return $this->getParameterValue(); |
|
55 | - } |
|
23 | + public function __construct(protected mixed &$parameter, protected bool $allowTypeChange = false) |
|
24 | + { |
|
25 | + } |
|
26 | + |
|
27 | + public function getParameterValue(): mixed |
|
28 | + { |
|
29 | + return $this->parameter; |
|
30 | + } |
|
31 | + |
|
32 | + /** |
|
33 | + * @throws PhpfastcacheInvalidTypeException |
|
34 | + */ |
|
35 | + public function setParameterValue(mixed $newValue): void |
|
36 | + { |
|
37 | + if (!$this->allowTypeChange) { |
|
38 | + $currentType = \gettype($this->parameter); |
|
39 | + $newType = \gettype($newValue); |
|
40 | + if ($newType !== $currentType) { |
|
41 | + throw new PhpfastcacheInvalidTypeException(\sprintf( |
|
42 | + 'You tried to change the variable type from "%s" to "%s", which is not allowed.', |
|
43 | + $currentType, |
|
44 | + $newType |
|
45 | + )); |
|
46 | + } |
|
47 | + } |
|
48 | + |
|
49 | + $this->parameter = $newValue; |
|
50 | + } |
|
51 | + |
|
52 | + public function __invoke(): mixed |
|
53 | + { |
|
54 | + return $this->getParameterValue(); |
|
55 | + } |
|
56 | 56 | } |
@@ -20,8 +20,7 @@ |
||
20 | 20 | |
21 | 21 | class EventReferenceParameter |
22 | 22 | { |
23 | - public function __construct(protected mixed &$parameter, protected bool $allowTypeChange = false) |
|
24 | - { |
|
23 | + public function __construct(protected mixed &$parameter, protected bool $allowTypeChange = false) { |
|
25 | 24 | } |
26 | 25 | |
27 | 26 | public function getParameterValue(): mixed |
@@ -18,34 +18,34 @@ |
||
18 | 18 | |
19 | 19 | trait EventManagerDispatcherTrait |
20 | 20 | { |
21 | - /** |
|
22 | - * @var EventManagerInterface |
|
23 | - */ |
|
24 | - protected EventManagerInterface $eventManager; |
|
21 | + /** |
|
22 | + * @var EventManagerInterface |
|
23 | + */ |
|
24 | + protected EventManagerInterface $eventManager; |
|
25 | 25 | /** |
26 | - * @return EventManagerInterface |
|
27 | - */ |
|
28 | - public function getEventManager(): EventManagerInterface |
|
29 | - { |
|
30 | - return $this->eventManager; |
|
31 | - } |
|
26 | + * @return EventManagerInterface |
|
27 | + */ |
|
28 | + public function getEventManager(): EventManagerInterface |
|
29 | + { |
|
30 | + return $this->eventManager; |
|
31 | + } |
|
32 | 32 | |
33 | - /** |
|
34 | - * @param EventManagerInterface $em |
|
35 | - * @return static |
|
36 | - */ |
|
37 | - public function setEventManager(EventManagerInterface $em): static |
|
38 | - { |
|
39 | - $this->eventManager = $em; |
|
40 | - return $this; |
|
41 | - } |
|
33 | + /** |
|
34 | + * @param EventManagerInterface $em |
|
35 | + * @return static |
|
36 | + */ |
|
37 | + public function setEventManager(EventManagerInterface $em): static |
|
38 | + { |
|
39 | + $this->eventManager = $em; |
|
40 | + return $this; |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * @deprecated Will be removed in v10 |
|
45 | - * @return bool |
|
46 | - */ |
|
47 | - public function hasEventManager(): bool |
|
48 | - { |
|
49 | - return isset($this->eventManager); |
|
50 | - } |
|
43 | + /** |
|
44 | + * @deprecated Will be removed in v10 |
|
45 | + * @return bool |
|
46 | + */ |
|
47 | + public function hasEventManager(): bool |
|
48 | + { |
|
49 | + return isset($this->eventManager); |
|
50 | + } |
|
51 | 51 | } |
@@ -20,31 +20,31 @@ |
||
20 | 20 | |
21 | 21 | class Event implements EventInterface |
22 | 22 | { |
23 | - use UninstanciableObjectTrait; |
|
23 | + use UninstanciableObjectTrait; |
|
24 | 24 | |
25 | - public const CACHE_GET_ITEM = 'CacheGetItem'; |
|
26 | - public const CACHE_GET_ITEMS = 'CacheGetItems'; |
|
27 | - public const CACHE_DELETE_ITEM = 'CacheDeleteItem'; |
|
28 | - public const CACHE_DELETE_ITEMS = 'CacheDeleteItems'; |
|
29 | - public const CACHE_SAVE_ITEM = 'CacheSaveItem'; |
|
30 | - public const CACHE_SAVE_MULTIPLE_ITEMS = 'CacheSaveMultipleItems'; |
|
31 | - public const CACHE_SAVE_DEFERRED_ITEM = 'CacheSaveDeferredItem'; |
|
32 | - public const CACHE_COMMIT_ITEM = 'CacheCommitItem'; |
|
33 | - public const CACHE_CLEAR_ITEM = 'CacheClearItem'; |
|
34 | - public const CACHE_WRITE_FILE_ON_DISK = 'CacheWriteFileOnDisk'; |
|
35 | - public const CACHE_GET_ITEM_IN_SLAM_BATCH = 'CacheGetItemInSlamBatch'; |
|
36 | - public const CACHE_REPLICATION_SLAVE_FALLBACK = 'CacheReplicationSlaveFallback'; |
|
37 | - public const CACHE_REPLICATION_RANDOM_POOL_CHOSEN = 'CacheReplicationRandomPoolChosen'; |
|
38 | - public const CACHE_CLUSTER_BUILT = 'CacheClusterBuilt'; |
|
39 | - public const CACHE_ITEM_SET = 'CacheItemSet'; |
|
40 | - public const CACHE_ITEM_EXPIRE_AT = 'CacheItemExpireAt'; |
|
41 | - public const CACHE_ITEM_EXPIRE_AFTER = 'CacheItemExpireAfter'; |
|
42 | - public const CACHE_GET_ALL_ITEMS = 'CacheGetAllItems'; |
|
43 | - public const CACHE_DRIVER_CHECKED = 'CacheDriverChecked'; |
|
44 | - public const CACHE_DRIVER_CONNECTED = 'CacheDriverConnected'; |
|
25 | + public const CACHE_GET_ITEM = 'CacheGetItem'; |
|
26 | + public const CACHE_GET_ITEMS = 'CacheGetItems'; |
|
27 | + public const CACHE_DELETE_ITEM = 'CacheDeleteItem'; |
|
28 | + public const CACHE_DELETE_ITEMS = 'CacheDeleteItems'; |
|
29 | + public const CACHE_SAVE_ITEM = 'CacheSaveItem'; |
|
30 | + public const CACHE_SAVE_MULTIPLE_ITEMS = 'CacheSaveMultipleItems'; |
|
31 | + public const CACHE_SAVE_DEFERRED_ITEM = 'CacheSaveDeferredItem'; |
|
32 | + public const CACHE_COMMIT_ITEM = 'CacheCommitItem'; |
|
33 | + public const CACHE_CLEAR_ITEM = 'CacheClearItem'; |
|
34 | + public const CACHE_WRITE_FILE_ON_DISK = 'CacheWriteFileOnDisk'; |
|
35 | + public const CACHE_GET_ITEM_IN_SLAM_BATCH = 'CacheGetItemInSlamBatch'; |
|
36 | + public const CACHE_REPLICATION_SLAVE_FALLBACK = 'CacheReplicationSlaveFallback'; |
|
37 | + public const CACHE_REPLICATION_RANDOM_POOL_CHOSEN = 'CacheReplicationRandomPoolChosen'; |
|
38 | + public const CACHE_CLUSTER_BUILT = 'CacheClusterBuilt'; |
|
39 | + public const CACHE_ITEM_SET = 'CacheItemSet'; |
|
40 | + public const CACHE_ITEM_EXPIRE_AT = 'CacheItemExpireAt'; |
|
41 | + public const CACHE_ITEM_EXPIRE_AFTER = 'CacheItemExpireAfter'; |
|
42 | + public const CACHE_GET_ALL_ITEMS = 'CacheGetAllItems'; |
|
43 | + public const CACHE_DRIVER_CHECKED = 'CacheDriverChecked'; |
|
44 | + public const CACHE_DRIVER_CONNECTED = 'CacheDriverConnected'; |
|
45 | 45 | |
46 | - public static function getEvents(): array |
|
47 | - { |
|
48 | - return (new \ReflectionClass(static::class))->getConstants(); |
|
49 | - } |
|
46 | + public static function getEvents(): array |
|
47 | + { |
|
48 | + return (new \ReflectionClass(static::class))->getConstants(); |
|
49 | + } |
|
50 | 50 | } |
@@ -54,65 +54,65 @@ |
||
54 | 54 | */ |
55 | 55 | interface EventManagerInterface |
56 | 56 | { |
57 | - /** |
|
58 | - * @return self |
|
59 | - */ |
|
60 | - public static function getInstance(): EventManagerInterface; |
|
57 | + /** |
|
58 | + * @return self |
|
59 | + */ |
|
60 | + public static function getInstance(): EventManagerInterface; |
|
61 | 61 | |
62 | - /** |
|
63 | - * @param EventManagerInterface $eventManagerInstance |
|
64 | - * @return void |
|
65 | - */ |
|
66 | - public static function setInstance(EventManagerInterface $eventManagerInstance): void; |
|
62 | + /** |
|
63 | + * @param EventManagerInterface $eventManagerInstance |
|
64 | + * @return void |
|
65 | + */ |
|
66 | + public static function setInstance(EventManagerInterface $eventManagerInstance): void; |
|
67 | 67 | |
68 | - /** |
|
69 | - * @param string $eventName |
|
70 | - * @param array<mixed> $args |
|
71 | - */ |
|
72 | - public function dispatch(string $eventName, ...$args): void; |
|
68 | + /** |
|
69 | + * @param string $eventName |
|
70 | + * @param array<mixed> $args |
|
71 | + */ |
|
72 | + public function dispatch(string $eventName, ...$args): void; |
|
73 | 73 | |
74 | - /** |
|
75 | - * @param string $name |
|
76 | - * @param array<mixed> $arguments |
|
77 | - * @throws PhpfastcacheInvalidArgumentException |
|
78 | - * @throws BadMethodCallException |
|
79 | - */ |
|
80 | - public function __call(string $name, array $arguments): void; |
|
74 | + /** |
|
75 | + * @param string $name |
|
76 | + * @param array<mixed> $arguments |
|
77 | + * @throws PhpfastcacheInvalidArgumentException |
|
78 | + * @throws BadMethodCallException |
|
79 | + */ |
|
80 | + public function __call(string $name, array $arguments): void; |
|
81 | 81 | |
82 | - /** |
|
83 | - * @param callable $callback |
|
84 | - * @param string $callbackName |
|
85 | - */ |
|
86 | - public function onEveryEvents(callable $callback, string $callbackName): void; |
|
82 | + /** |
|
83 | + * @param callable $callback |
|
84 | + * @param string $callbackName |
|
85 | + */ |
|
86 | + public function onEveryEvents(callable $callback, string $callbackName): void; |
|
87 | 87 | |
88 | - /** |
|
89 | - * @param string[]|string $events |
|
90 | - * @param callable $callback |
|
91 | - */ |
|
92 | - public function on(array|string $events, callable $callback): void; |
|
88 | + /** |
|
89 | + * @param string[]|string $events |
|
90 | + * @param callable $callback |
|
91 | + */ |
|
92 | + public function on(array|string $events, callable $callback): void; |
|
93 | 93 | |
94 | - /** |
|
95 | - * @param string $eventName |
|
96 | - * @param string $callbackName |
|
97 | - * @return bool |
|
98 | - */ |
|
99 | - public function unbindEventCallback(string $eventName, string $callbackName): bool; |
|
94 | + /** |
|
95 | + * @param string $eventName |
|
96 | + * @param string $callbackName |
|
97 | + * @return bool |
|
98 | + */ |
|
99 | + public function unbindEventCallback(string $eventName, string $callbackName): bool; |
|
100 | 100 | |
101 | - /** |
|
102 | - * @return bool |
|
103 | - */ |
|
104 | - public function unbindAllEventCallbacks(): bool; |
|
101 | + /** |
|
102 | + * @return bool |
|
103 | + */ |
|
104 | + public function unbindAllEventCallbacks(): bool; |
|
105 | 105 | |
106 | - /** |
|
107 | - * @param ExtendedCacheItemPoolInterface $pool |
|
108 | - * @return EventManagerInterface |
|
109 | - */ |
|
110 | - public function getScopedEventManager(ExtendedCacheItemPoolInterface $pool): EventManagerInterface; |
|
106 | + /** |
|
107 | + * @param ExtendedCacheItemPoolInterface $pool |
|
108 | + * @return EventManagerInterface |
|
109 | + */ |
|
110 | + public function getScopedEventManager(ExtendedCacheItemPoolInterface $pool): EventManagerInterface; |
|
111 | 111 | |
112 | - /** |
|
113 | - * @param ExtendedCacheItemPoolInterface $pool |
|
114 | - * @return EventManagerInterface |
|
115 | - * @throws PhpfastcacheEventManagerException |
|
116 | - */ |
|
117 | - public function setItemPoolContext(ExtendedCacheItemPoolInterface $pool): EventManagerInterface; |
|
112 | + /** |
|
113 | + * @param ExtendedCacheItemPoolInterface $pool |
|
114 | + * @return EventManagerInterface |
|
115 | + * @throws PhpfastcacheEventManagerException |
|
116 | + */ |
|
117 | + public function setItemPoolContext(ExtendedCacheItemPoolInterface $pool): EventManagerInterface; |
|
118 | 118 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | * @param string[]|string $events |
90 | 90 | * @param callable $callback |
91 | 91 | */ |
92 | - public function on(array|string $events, callable $callback): void; |
|
92 | + public function on(array | string $events, callable $callback): void; |
|
93 | 93 | |
94 | 94 | /** |
95 | 95 | * @param string $eventName |
@@ -18,20 +18,20 @@ |
||
18 | 18 | |
19 | 19 | interface EventManagerDispatcherInterface |
20 | 20 | { |
21 | - /** |
|
22 | - * @return EventManagerInterface |
|
23 | - */ |
|
24 | - public function getEventManager(): EventManagerInterface; |
|
21 | + /** |
|
22 | + * @return EventManagerInterface |
|
23 | + */ |
|
24 | + public function getEventManager(): EventManagerInterface; |
|
25 | 25 | |
26 | - /** |
|
27 | - * @param EventManagerInterface $eventManager |
|
28 | - * @return mixed |
|
29 | - */ |
|
30 | - public function setEventManager(EventManagerInterface $eventManager): static; |
|
26 | + /** |
|
27 | + * @param EventManagerInterface $eventManager |
|
28 | + * @return mixed |
|
29 | + */ |
|
30 | + public function setEventManager(EventManagerInterface $eventManager): static; |
|
31 | 31 | |
32 | - /** |
|
33 | - * @return bool |
|
34 | - * @deprecated Will be removed in v10 |
|
35 | - */ |
|
36 | - public function hasEventManager(): bool; |
|
32 | + /** |
|
33 | + * @return bool |
|
34 | + * @deprecated Will be removed in v10 |
|
35 | + */ |
|
36 | + public function hasEventManager(): bool; |
|
37 | 37 | } |
@@ -18,8 +18,8 @@ |
||
18 | 18 | |
19 | 19 | interface EventInterface |
20 | 20 | { |
21 | - /** |
|
22 | - * @return array<string, string> |
|
23 | - */ |
|
24 | - public static function getEvents(): array; |
|
21 | + /** |
|
22 | + * @return array<string, string> |
|
23 | + */ |
|
24 | + public static function getEvents(): array; |
|
25 | 25 | } |
@@ -65,24 +65,24 @@ |
||
65 | 65 | */ |
66 | 66 | interface PhpfastcacheAbstractProxyInterface |
67 | 67 | { |
68 | - public const DRIVER_CHECK_FAILURE = ExtendedCacheItemPoolInterface::DRIVER_CHECK_FAILURE; |
|
69 | - public const DRIVER_CONNECT_FAILURE = ExtendedCacheItemPoolInterface::DRIVER_CONNECT_FAILURE; |
|
70 | - public const DRIVER_KEY_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_KEY_WRAPPER_INDEX; |
|
71 | - public const DRIVER_DATA_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_DATA_WRAPPER_INDEX; |
|
72 | - public const DRIVER_EDATE_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_EDATE_WRAPPER_INDEX; |
|
73 | - public const DRIVER_CDATE_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_CDATE_WRAPPER_INDEX; |
|
74 | - public const DRIVER_MDATE_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_MDATE_WRAPPER_INDEX; |
|
68 | + public const DRIVER_CHECK_FAILURE = ExtendedCacheItemPoolInterface::DRIVER_CHECK_FAILURE; |
|
69 | + public const DRIVER_CONNECT_FAILURE = ExtendedCacheItemPoolInterface::DRIVER_CONNECT_FAILURE; |
|
70 | + public const DRIVER_KEY_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_KEY_WRAPPER_INDEX; |
|
71 | + public const DRIVER_DATA_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_DATA_WRAPPER_INDEX; |
|
72 | + public const DRIVER_EDATE_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_EDATE_WRAPPER_INDEX; |
|
73 | + public const DRIVER_CDATE_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_CDATE_WRAPPER_INDEX; |
|
74 | + public const DRIVER_MDATE_WRAPPER_INDEX = ExtendedCacheItemPoolInterface::DRIVER_MDATE_WRAPPER_INDEX; |
|
75 | 75 | |
76 | - public const DRIVER_TAGS_KEY_PREFIX = TaggableCacheItemPoolInterface::DRIVER_TAGS_KEY_PREFIX; |
|
77 | - public const DRIVER_TAGS_WRAPPER_INDEX = TaggableCacheItemPoolInterface::DRIVER_TAGS_WRAPPER_INDEX; |
|
78 | - public const TAG_STRATEGY_ONE = TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE; |
|
79 | - public const TAG_STRATEGY_ALL = TaggableCacheItemPoolInterface::TAG_STRATEGY_ALL; |
|
80 | - public const TAG_STRATEGY_ONLY = TaggableCacheItemPoolInterface::TAG_STRATEGY_ONLY; |
|
76 | + public const DRIVER_TAGS_KEY_PREFIX = TaggableCacheItemPoolInterface::DRIVER_TAGS_KEY_PREFIX; |
|
77 | + public const DRIVER_TAGS_WRAPPER_INDEX = TaggableCacheItemPoolInterface::DRIVER_TAGS_WRAPPER_INDEX; |
|
78 | + public const TAG_STRATEGY_ONE = TaggableCacheItemPoolInterface::TAG_STRATEGY_ONE; |
|
79 | + public const TAG_STRATEGY_ALL = TaggableCacheItemPoolInterface::TAG_STRATEGY_ALL; |
|
80 | + public const TAG_STRATEGY_ONLY = TaggableCacheItemPoolInterface::TAG_STRATEGY_ONLY; |
|
81 | 81 | |
82 | - /** |
|
83 | - * @param string $name |
|
84 | - * @param array<mixed> $args |
|
85 | - * @return mixed |
|
86 | - */ |
|
87 | - public function __call(string $name, array $args): mixed; |
|
82 | + /** |
|
83 | + * @param string $name |
|
84 | + * @param array<mixed> $args |
|
85 | + * @return mixed |
|
86 | + */ |
|
87 | + public function __call(string $name, array $args): mixed; |
|
88 | 88 | } |
@@ -32,30 +32,30 @@ |
||
32 | 32 | */ |
33 | 33 | abstract class PhpfastcacheAbstractProxy implements PhpfastcacheAbstractProxyInterface |
34 | 34 | { |
35 | - /** |
|
36 | - * @var ExtendedCacheItemPoolInterface |
|
37 | - */ |
|
38 | - protected ExtendedCacheItemPoolInterface $instance; |
|
35 | + /** |
|
36 | + * @var ExtendedCacheItemPoolInterface |
|
37 | + */ |
|
38 | + protected ExtendedCacheItemPoolInterface $instance; |
|
39 | 39 | |
40 | - /** |
|
41 | - * PhpfastcacheAbstractProxy constructor. |
|
42 | - * @param string $driver |
|
43 | - * @param null|ConfigurationOptionInterface $config |
|
44 | - * @throws PhpfastcacheDriverCheckException |
|
45 | - * @throws PhpfastcacheDriverException |
|
46 | - * @throws PhpfastcacheDriverNotFoundException |
|
47 | - * @throws PhpfastcacheLogicException |
|
48 | - */ |
|
49 | - public function __construct(string $driver, ?ConfigurationOptionInterface $config = null) |
|
50 | - { |
|
51 | - $this->instance = CacheManager::getInstance($driver, $config); |
|
52 | - } |
|
40 | + /** |
|
41 | + * PhpfastcacheAbstractProxy constructor. |
|
42 | + * @param string $driver |
|
43 | + * @param null|ConfigurationOptionInterface $config |
|
44 | + * @throws PhpfastcacheDriverCheckException |
|
45 | + * @throws PhpfastcacheDriverException |
|
46 | + * @throws PhpfastcacheDriverNotFoundException |
|
47 | + * @throws PhpfastcacheLogicException |
|
48 | + */ |
|
49 | + public function __construct(string $driver, ?ConfigurationOptionInterface $config = null) |
|
50 | + { |
|
51 | + $this->instance = CacheManager::getInstance($driver, $config); |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * @inheritDoc |
|
56 | - */ |
|
57 | - public function __call(string $name, array $args): mixed |
|
58 | - { |
|
59 | - return $this->instance->$name(...$args); |
|
60 | - } |
|
54 | + /** |
|
55 | + * @inheritDoc |
|
56 | + */ |
|
57 | + public function __call(string $name, array $args): mixed |
|
58 | + { |
|
59 | + return $this->instance->$name(...$args); |
|
60 | + } |
|
61 | 61 | } |
@@ -46,8 +46,7 @@ |
||
46 | 46 | * @throws PhpfastcacheDriverNotFoundException |
47 | 47 | * @throws PhpfastcacheLogicException |
48 | 48 | */ |
49 | - public function __construct(string $driver, ?ConfigurationOptionInterface $config = null) |
|
50 | - { |
|
49 | + public function __construct(string $driver, ?ConfigurationOptionInterface $config = null) { |
|
51 | 50 | $this->instance = CacheManager::getInstance($driver, $config); |
52 | 51 | } |
53 | 52 |