Skip to content

Commit 80efd8f

Browse files
committed
minor #23505 [Cache] add constructor docblocks for clarity (xabbuh)
This PR was merged into the 3.3 branch. Discussion ---------- [Cache] add constructor docblocks for clarity | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23503 | License | MIT | Doc PR | Commits ------- d1ce532 [Cache] add constructor docblocks for clarity
2 parents 7beac82 + d1ce532 commit 80efd8f

File tree

7 files changed

+33
-0
lines changed

7 files changed

+33
-0
lines changed

src/Symfony/Component/Cache/Simple/AbstractCache.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ abstract class AbstractCache implements CacheInterface, LoggerAwareInterface
3030

3131
private $defaultLifetime;
3232

33+
/**
34+
* @param string $namespace
35+
* @param int $defaultLifetime
36+
*/
3337
protected function __construct($namespace = '', $defaultLifetime = 0)
3438
{
3539
$this->defaultLifetime = max(0, (int) $defaultLifetime);

src/Symfony/Component/Cache/Simple/ApcuCache.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ class ApcuCache extends AbstractCache
1717
{
1818
use ApcuTrait;
1919

20+
/**
21+
* @param string $namespace
22+
* @param int $defaultLifetime
23+
* @param string|null $version
24+
*/
2025
public function __construct($namespace = '', $defaultLifetime = 0, $version = null)
2126
{
2227
$this->init($namespace, $defaultLifetime, $version);

src/Symfony/Component/Cache/Simple/DoctrineCache.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ class DoctrineCache extends AbstractCache
1818
{
1919
use DoctrineTrait;
2020

21+
/**
22+
* @param CacheProvider $provider
23+
* @param string $namespace
24+
* @param int $defaultLifetime
25+
*/
2126
public function __construct(CacheProvider $provider, $namespace = '', $defaultLifetime = 0)
2227
{
2328
parent::__construct('', $defaultLifetime);

src/Symfony/Component/Cache/Simple/FilesystemCache.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ class FilesystemCache extends AbstractCache
1717
{
1818
use FilesystemTrait;
1919

20+
/**
21+
* @param string $namespace
22+
* @param int $defaultLifetime
23+
* @param string|null $directory
24+
*/
2025
public function __construct($namespace = '', $defaultLifetime = 0, $directory = null)
2126
{
2227
parent::__construct('', $defaultLifetime);

src/Symfony/Component/Cache/Simple/MemcachedCache.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ class MemcachedCache extends AbstractCache
1919

2020
protected $maxIdLength = 250;
2121

22+
/**
23+
* @param \Memcached $client
24+
* @param string $namespace
25+
* @param int $defaultLifetime
26+
*/
2227
public function __construct(\Memcached $client, $namespace = '', $defaultLifetime = 0)
2328
{
2429
$this->init($client, $namespace, $defaultLifetime);

src/Symfony/Component/Cache/Simple/PhpFilesCache.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ class PhpFilesCache extends AbstractCache
1818
{
1919
use PhpFilesTrait;
2020

21+
/**
22+
* @param string $namespace
23+
* @param int $defaultLifetime
24+
* @param string|null $directory
25+
*
26+
* @throws CacheException if OPcache is not enabled
27+
*/
2128
public function __construct($namespace = '', $defaultLifetime = 0, $directory = null)
2229
{
2330
if (!static::isSupported()) {

src/Symfony/Component/Cache/Simple/RedisCache.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class RedisCache extends AbstractCache
1919

2020
/**
2121
* @param \Redis|\RedisArray|\RedisCluster|\Predis\Client $redisClient
22+
* @param string $namespace
23+
* @param int $defaultLifetime
2224
*/
2325
public function __construct($redisClient, $namespace = '', $defaultLifetime = 0)
2426
{

0 commit comments

Comments
 (0)