Skip to content

Commit 3bfac1a

Browse files
committed
[HttpFoundation] Add RedisSessionHandler (coding style)
1 parent 7f021c9 commit 3bfac1a

File tree

5 files changed

+10
-24
lines changed

5 files changed

+10
-24
lines changed

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase
2929
protected $storage;
3030

3131
/**
32-
* @var \Redis|\RedisArray|\RedisCluster|\Predis\Client|\PHPUnit_Framework_MockObject_MockObject
32+
* @var \Redis|\RedisArray|\RedisCluster|\Predis\Client
3333
*/
3434
protected $redisClient;
3535

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@
1111

1212
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
1313

14+
use Predis\Client;
15+
1416
class PredisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1517
{
16-
/**
17-
* @return \Predis\Client
18-
*/
19-
protected function createRedisClient(string $host): \Predis\Client
18+
protected function createRedisClient(string $host): Client
2019
{
21-
$redis = new \Predis\Client(array(\compact('host')));
22-
23-
return $redis;
20+
return new Client(array(\compact('host')));
2421
}
2522
}

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@
1111

1212
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
1313

14+
use Predis\Client;
15+
1416
class PredisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1517
{
16-
/**
17-
* @return \Predis\Client
18-
*/
19-
protected function createRedisClient(string $host): \Predis\Client
18+
protected function createRedisClient(string $host): Client
2019
{
21-
$redis = new \Predis\Client(\compact('host'));
22-
23-
return $redis;
20+
return new Client(\compact('host'));
2421
}
2522
}

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@
1313

1414
class RedisArraySessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1515
{
16-
/**
17-
* @return \RedisArray
18-
*/
1916
protected function createRedisClient(string $host): \RedisArray
2017
{
21-
$redis = new \RedisArray(array($host));
22-
23-
return $redis;
18+
return new \RedisArray(array($host));
2419
}
2520
}

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
class RedisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1515
{
16-
/**
17-
* @return \Redis
18-
*/
1916
protected function createRedisClient(string $host): \Redis
2017
{
2118
$client = new \Redis();

0 commit comments

Comments
 (0)