diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php index e8d31778a31a9..a04ef46a90f38 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php @@ -96,11 +96,7 @@ private function getKernel() ->expects($this->atLeastOnce()) ->method('has') ->will($this->returnCallback(function ($id) { - if ('console.command_loader' === $id) { - return false; - } - - return true; + return 'console.command_loader' !== $id; })) ; $container diff --git a/src/Symfony/Component/Cache/Adapter/SimpleCacheAdapter.php b/src/Symfony/Component/Cache/Adapter/SimpleCacheAdapter.php index 24db5d504ab68..bdb62a4bb3809 100644 --- a/src/Symfony/Component/Cache/Adapter/SimpleCacheAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/SimpleCacheAdapter.php @@ -13,13 +13,12 @@ use Psr\SimpleCache\CacheInterface; use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; use Symfony\Component\Cache\Traits\ProxyTrait; /** * @author Nicolas Grekas
*/
-class SimpleCacheAdapter extends AbstractAdapter implements PruneableInterface, ResettableInterface
+class SimpleCacheAdapter extends AbstractAdapter implements PruneableInterface
{
use ProxyTrait;
diff --git a/src/Symfony/Component/Dotenv/Dotenv.php b/src/Symfony/Component/Dotenv/Dotenv.php
index d21e0435062b1..b43529abdfc3b 100644
--- a/src/Symfony/Component/Dotenv/Dotenv.php
+++ b/src/Symfony/Component/Dotenv/Dotenv.php
@@ -33,7 +33,6 @@ final class Dotenv
private $lineno;
private $data;
private $end;
- private $state;
private $values;
/**
@@ -111,27 +110,27 @@ public function parse($data, $path = '.env')
$this->lineno = 1;
$this->cursor = 0;
$this->end = \strlen($this->data);
- $this->state = self::STATE_VARNAME;
+ $state = self::STATE_VARNAME;
$this->values = [];
$name = '';
$this->skipEmptyLines();
while ($this->cursor < $this->end) {
- switch ($this->state) {
+ switch ($state) {
case self::STATE_VARNAME:
$name = $this->lexVarname();
- $this->state = self::STATE_VALUE;
+ $state = self::STATE_VALUE;
break;
case self::STATE_VALUE:
$this->values[$name] = $this->lexValue();
- $this->state = self::STATE_VARNAME;
+ $state = self::STATE_VARNAME;
break;
}
}
- if (self::STATE_VALUE === $this->state) {
+ if (self::STATE_VALUE === $state) {
$this->values[$name] = '';
}
diff --git a/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php b/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php
index 77f9e2f61839c..fed9e7e3febe7 100644
--- a/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php
+++ b/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php
@@ -105,7 +105,7 @@ public function configure(Event $event = null)
if (method_exists($kernel = $event->getKernel(), 'terminateWithException')) {
$request = $event->getRequest();
$hasRun = &$this->hasTerminatedWithException;
- $this->exceptionHandler = function (\Exception $e) use ($kernel, $request, &$hasRun) {
+ $this->exceptionHandler = static function (\Exception $e) use ($kernel, $request, &$hasRun) {
if ($hasRun) {
throw $e;
}
diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php
index 862bac557dd77..1efad607e8277 100644
--- a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php
+++ b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php
@@ -215,7 +215,7 @@ private function storeRelativeAgeDirective($directive, $value, $age)
}
if (false !== $this->ageDirectives[$directive]) {
- $value = $value - $age;
+ $value -= $age;
$this->ageDirectives[$directive] = null !== $this->ageDirectives[$directive] ? min($this->ageDirectives[$directive], $value) : $value;
}
}
diff --git a/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php b/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php
index 17e01ebf8dd0c..00048226b6aa3 100644
--- a/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php
+++ b/src/Symfony/Component/Security/Guard/Token/PostAuthenticationGuardToken.php
@@ -47,7 +47,7 @@ public function __construct(UserInterface $user, $providerKey, array $roles)
// this token is meant to be used after authentication success, so it is always authenticated
// you could set it as non authenticated later if you need to
- parent::setAuthenticated(true);
+ $this->setAuthenticated(true);
}
/**
diff --git a/src/Symfony/Component/Workflow/Exception/InvalidTokenConfigurationException.php b/src/Symfony/Component/Workflow/Exception/InvalidTokenConfigurationException.php
index 681d7a8bba52d..a70fd4c98ddff 100644
--- a/src/Symfony/Component/Workflow/Exception/InvalidTokenConfigurationException.php
+++ b/src/Symfony/Component/Workflow/Exception/InvalidTokenConfigurationException.php
@@ -16,6 +16,6 @@
*
* @author Matt Johnson