Skip to content

Commit 254336e

Browse files
committed
style
1 parent fc2c2b4 commit 254336e

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

src/KeyNormalizer.php

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

3+
/*
4+
* This file is part of php-cache\cache-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>, Tobias Nyholm <[email protected]>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
10+
*/
11+
312
namespace Cache\CacheBundle;
413

514
/**

src/Routing/CachingRouter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
class CachingRouter implements RouterInterface
2424
{
2525
/**
26-
* @var CacheItemPoolInterface
26+
* @type CacheItemPoolInterface
2727
*/
2828
private $cache;
2929

3030
/**
31-
* @var int
31+
* @type int
3232
*/
3333
private $ttl;
3434

3535
/**
36-
* @var RouterInterface
36+
* @type RouterInterface
3737
*/
3838
private $router;
3939

@@ -44,8 +44,8 @@ class CachingRouter implements RouterInterface
4444
*/
4545
public function __construct(CacheItemPoolInterface $cache, RouterInterface $router, array $config)
4646
{
47-
$this->cache = $cache;
48-
$this->ttl = $config['ttl'];
47+
$this->cache = $cache;
48+
$this->ttl = $config['ttl'];
4949
$this->router = $router;
5050
}
5151

@@ -124,8 +124,8 @@ public function getContext()
124124
*/
125125
private function getCacheItemMatch($pathinfo)
126126
{
127-
/** @var RequestContext $c */
128-
$c = $this->getContext();
127+
/** @type RequestContext $c */
128+
$c = $this->getContext();
129129
$key = sprintf('%s__%s__%s__%s', $c->getHost(), $pathinfo, $c->getMethod(), $c->getQueryString());
130130

131131
return $this->getCacheItemFromKey($key, 'match');

tests/KeyNormalizerTest.php

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

3+
/*
4+
* This file is part of php-cache\cache-bundle package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <[email protected]>, Tobias Nyholm <[email protected]>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
10+
*/
11+
312
namespace Cache\CacheBundle\Tests;
413

514
use Cache\CacheBundle\KeyNormalizer;
@@ -8,14 +17,14 @@ class KeyNormalizerTest extends \PHPUnit_Framework_TestCase
817
{
918
public function testOnlyValid()
1019
{
11-
$input = '%foo!bar-';
20+
$input = '%foo!bar-';
1221
$expected = 'foobar';
1322
$this->assertEquals($expected, KeyNormalizer::onlyValid($input));
1423
}
1524

1625
public function testNoInvalid()
1726
{
18-
$input = '{foo@bar}';
27+
$input = '{foo@bar}';
1928
$expected = 'foobar';
2029
$this->assertEquals($expected, KeyNormalizer::noInvalid($input));
2130
}

0 commit comments

Comments
 (0)