8000 [Cache] add constructor docblocks for clarity · symfony/symfony@813a537 · GitHub
[go: up one dir, main page]

Skip to content

Commit 813a537

Browse files
committed
[Cache] add constructor docblocks for clarity
1 parent 6304938 commit 813a537

File tree

6 files changed

+43
-1
lines changed

6 files changed

+43
-1
lines changed

src/Symfony/Component/Cache/Adapter/AbstractAdapter.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface
3939
*/
4040
protected $maxIdLength;
4141

42+
/**
43+
* @param string $namespace
44+
* @param int $defaultLifetime
45+
*/
4246
protected function __construct($namespace = '', $defaultLifetime = 0)
4347
{
4448
$this->namespace = '' === $namespace ? '' : $this->getId($namespace).':';
@@ -81,6 +85,15 @@ function ($deferred, $namespace, &$expiredIds) {
8185
);
8286
}
8387

88+
/**
89+
* @param string $namespace
90+
* @param int $defaultLifetime
91+
* @param string $version
92+
* @param string $directory
93+
* @param LoggerInterface|null $logger
94+
*
95+
* @return AdapterInterface
96+
*/
8497
public static function createSystemCache($namespace, $defaultLifetime, $version, $directory, LoggerInterface $logger = null)
8598
{
8699
if (null === self::$apcuSupported) {
@@ -139,7 +152,7 @@ abstract protected function doHave($id);
139152
/**
140153
* Deletes all items in the pool.
141154
*
142-
* @param string The prefix used for all identifiers managed by this pool
155+
* @param string $namespace The prefix used for all identifiers managed by this pool
143156
*
144157
* @return bool True if the pool was successfully cleared, false otherwise
145158
*/

src/Symfony/Component/Cache/Adapter/ApcuAdapter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ public static function isSupported()
2424
return function_exists('apcu_fetch') && ini_get('apc.enabled');
2525
}
2626

27+
/**
28+
* @param string $namespace
29+
* @param int $defaultLifetime
30+
* @param string|null $version
31+
*
32+
* @throws CacheException if APCu is not enabled
33+
*/
2734
public function __construct($namespace = '', $defaultLifetime = 0, $version = null)
2835
{
2936
if (!static::isSupported()) {

src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class DoctrineAdapter extends AbstractAdapter
2020
{
2121
private $provider;
2222

23+
/**
24+
* @param CacheProvider $provider
25+
* @param string $namespace
26+
* @param int $defaultLifetime
27+
*/
2328
public function __construct(CacheProvider $provider, $namespace = '', $defaultLifetime = 0)
2429
{
2530
parent::__construct('', $defaultLifetime);

src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class FilesystemAdapter extends AbstractAdapter
2020
{
2121
use FilesystemAdapterTrait;
2222

23+
/**
24+
* @param string $namespace
25+
* @param int $defaultLifetime
26+
* @param string|null $directory
27+
*/
2328
public function __construct($namespace = '', $defaultLifetime = 0, $directory = null)
2429
{
2530
parent::__construct('', $defaultLifetime);

src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ public static function isSupported()
2929
return function_exists('opcache_invalidate') && ini_get('opcache.enable');
3030
}
3131

32+
/**
33+
* @param string $namespace
34+
* @param int $defaultLifetime
35+
* @param string|null $directory
36+
*
37+
* @throws CacheException if OPcache is not enabled
38+
*/
3239
public function __construct($namespace = '', $defaultLifetime = 0, $directory = null)
3340
{
3441
if (!static::isSupported()) {

src/Symfony/Component/Cache/Adapter/ProxyAdapter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ class ProxyAdapter implements AdapterInterface
2626
private $createCacheItem;
2727
private $poolHash;
2828

29+
/**
30+
* @param CacheItemPoolInterface $pool
31+
* @param string $namespace
32+
* @param int $defaultLifetime
33+
*/
2934
public function __construct(CacheItemPoolInterface $pool, $namespace = '', $defaultLifetime = 0)
3035
{
3136
$this->pool = $pool;

0 commit comments

Comments
 (0)
0