Skip to content

Commit 34b6d11

Browse files
committed
applied codestyle fixer to remove unused imports and align phpdoc
1 parent c41edd6 commit 34b6d11

File tree

10 files changed

+20
-27
lines changed

10 files changed

+20
-27
lines changed

DependencyInjection/FOSHttpCacheExtension.php

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public function load(array $configs, ContainerBuilder $container)
6161
$loader->load('cache_manager.xml');
6262
}
6363

64-
6564
if ($config['tags']['enabled']) {
6665
// true or auto
6766
$loader->load('tag_listener.xml');

EventListener/InvalidationSubscriber.php

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Symfony\Component\Console\Event\ConsoleEvent;
2020
use Symfony\Component\Console\Output\OutputInterface;
2121
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
22-
use Symfony\Component\ExpressionLanguage\SyntaxError;
2322
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
2423
use Symfony\Component\HttpFoundation\Request;
2524
use Symfony\Component\HttpFoundation\Response;

Security/Http/Logout/ContextInvalidationLogoutHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public function __construct(BanInterface $banner, $userIdentifierHeaders, $accep
5050
/**
5151
* Invalidate the user context hash
5252
*
53-
* @param Request $request
54-
* @param Response $response
53+
* @param Request $request
54+
* @param Response $response
5555
* @param TokenInterface $token
5656
*/
5757
public function logout(Request $request, Response $response, TokenInterface $token)

Tests/Functional/Fixtures/Session/TestSessionStorage.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class TestSessionStorage implements SessionStorageInterface
1818
*
1919
* @throws \RuntimeException If something goes wrong starting the session.
2020
*
21-
* @return bool True if started.
21+
* @return bool True if started.
2222
*
2323
* @api
2424
*/
@@ -30,7 +30,7 @@ public function start()
3030
/**
3131
* Checks if the session is started.
3232
*
33-
* @return bool True if started, false otherwise.
33+
* @return bool True if started, false otherwise.
3434
*/
3535
public function isStarted()
3636
{
@@ -94,13 +94,13 @@ public function setName($name)
9494
* Note regenerate+destroy should not clear the session data in memory
9595
* only delete the session data from persistent storage.
9696
*
97-
* @param bool $destroy Destroy session when regenerating?
98-
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
99-
* will leave the system settings unchanged, 0 sets the cookie
100-
* to expire with browser session. Time is in seconds, and is
101-
* not a Unix timestamp.
97+
* @param bool $destroy Destroy session when regenerating?
98+
* @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
99+
* will leave the system settings unchanged, 0 sets the cookie
100+
* to expire with browser session. Time is in seconds, and is
101+
* not a Unix timestamp.
102102
*
103-
* @return bool True if session regenerated, false if error
103+
* @return bool True if session regenerated, false if error
104104
*
105105
* @throws \RuntimeException If an error occurs while regenerating this storage
106106
*
@@ -168,4 +168,4 @@ public function getMetadataBag()
168168
{
169169
return null;
170170
}
171-
}
171+
}

Tests/Functional/Security/Http/Logout/ContextInvalidationLogoutHandlerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ public function testLogout()
2222
$client->getCookieJar()->set(new Cookie('TESTSESSID', 'test'));
2323
$client->request('GET', '/secured_area/logout');
2424
}
25-
}
25+
}

Tests/Resources/Fixtures/config/nginx.yml

-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ fos_http_cache:
66
base_url: /test
77
purge_location: /purge
88
guzzle_client: acme.guzzle.nginx
9-

Tests/Unit/Configuration/InvalidateRouteTest.php

-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111

1212
namespace FOS\HttpCacheBundle\Tests\Unit\Configuration;
1313

14-
use FOS\HttpCacheBundle\Command\InvalidatePathCommand;
1514
use FOS\HttpCacheBundle\Configuration\InvalidateRoute;
16-
use Symfony\Component\Console\Application;
17-
use Symfony\Component\Console\Tester\CommandTester;
1815

1916
/**
2017
* Test the @InvalidateRoute annotation.

Tests/Unit/DependencyInjection/Compiler/HashGeneratorPassTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use FOS\HttpCacheBundle\DependencyInjection\Compiler\HashGeneratorPass;
1515
use FOS\HttpCacheBundle\DependencyInjection\FOSHttpCacheExtension;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
17-
use Symfony\Component\DependencyInjection\DefinitionDecorator;
1817
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
1918

2019
class HashGeneratorPassTest extends \PHPUnit_Framework_TestCase

Tests/Unit/DependencyInjection/ConfigurationTest.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function testCacheManagerNoClient()
268268
try {
269269
$this->assertProcessedConfigurationEquals(array(), array($format));
270270
$this->fail('No exception thrown on invalid configuration');
271-
} catch(InvalidConfigurationException $e) {
271+
} catch (InvalidConfigurationException $e) {
272272
$this->assertContains('need to configure a proxy_client', $e->getMessage());
273273
}
274274
}
@@ -288,7 +288,7 @@ public function testTagsNoCacheManager()
288288
try {
289289
$this->assertProcessedConfigurationEquals(array(), array($format));
290290
$this->fail('No exception thrown on invalid configuration');
291-
} catch(InvalidConfigurationException $e) {
291+
} catch (InvalidConfigurationException $e) {
292292
$this->assertContains('cache_manager needed for tag handling', $e->getMessage());
293293
}
294294
}
@@ -308,7 +308,7 @@ public function testInvalidationNoCacheManager()
308308
try {
309309
$this->assertProcessedConfigurationEquals(array(), array($format));
310310
$this->fail('No exception thrown on invalid configuration');
311-
} catch(InvalidConfigurationException $e) {
311+
} catch (InvalidConfigurationException $e) {
312312
$this->assertContains('cache_manager needed for invalidation handling', $e->getMessage());
313313
}
314314
}
@@ -329,7 +329,7 @@ public function testTagRulesNotEnabled()
329329
try {
330330
$this->assertProcessedConfigurationEquals(array(), array($format));
331331
$this->fail('No exception thrown on invalid configuration');
332-
} catch(InvalidConfigurationException $e) {
332+
} catch (InvalidConfigurationException $e) {
333333
$this->assertContains('need to enable the cache_manager and tags to use rules', $e->getMessage());
334334
}
335335
}
@@ -350,7 +350,7 @@ public function testInvalidationRulesNotEnabled()
350350
try {
351351
$this->assertProcessedConfigurationEquals(array(), array($format));
352352
$this->fail('No exception thrown on invalid configuration');
353-
} catch(InvalidConfigurationException $e) {
353+
} catch (InvalidConfigurationException $e) {
354354
$this->assertContains('need to enable the cache_manager and invalidation to use rules', $e->getMessage());
355355
}
356356
}
@@ -370,7 +370,7 @@ public function testInvalidDate()
370370
try {
371371
$this->assertProcessedConfigurationEquals(array(), array($format));
372372
$this->fail('No exception thrown on invalid configuration');
373-
} catch(InvalidConfigurationException $e) {
373+
} catch (InvalidConfigurationException $e) {
374374
$this->assertContains('Failed to parse time string', $e->getMessage());
375375
}
376376
}
@@ -393,7 +393,7 @@ public function testRulesBothStatusAndExpression()
393393
try {
394394
$this->assertProcessedConfigurationEquals(array(), array($format));
395395
$this->fail('No exception thrown on invalid configuration');
396-
} catch(InvalidConfigurationException $e) {
396+
} catch (InvalidConfigurationException $e) {
397397
$this->assertContains('may not set both additional_cacheable_status and match_response', $e->getMessage());
398398
}
399399
}

Tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ private function assertMatcherCreated(ContainerBuilder $container, array $attrib
344344
// first argument should be the reference to the matcher
345345
$reference = $ruleDefinition->getArgument(0);
346346
$this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $reference);
347-
$this->assertEquals($matcherId, (string)$reference);
347+
$this->assertEquals($matcherId, (string) $reference);
348348

349349
return $matcherDefinition;
350350
}

0 commit comments

Comments
 (0)