unified return null usages

This commit is contained in:
Fabien Potencier 2014-04-18 22:38:54 +02:00
parent 2827747108
commit e50d263f7a
6 changed files with 7 additions and 9 deletions

View File

@ -36,7 +36,7 @@ class DoctrineParserCache implements ParserCacheInterface
public function fetch($key)
{
if (false === $value = $this->cache->fetch($key)) {
return null;
return;
}
return $value;

View File

@ -93,8 +93,6 @@ class ItemQuery
if (isset($this->caseInsensitiveMap[$column])) {
return $this->getColumn($this->caseInsensitiveMap[$column]);
}
return null;
}
/**

View File

@ -34,7 +34,7 @@ class SessionListener extends BaseSessionListener
protected function getSession()
{
if (!$this->container->has('session')) {
return null;
return;
}
return $this->container->get('session');

View File

@ -31,7 +31,7 @@ class TestSessionListener extends BaseTestSessionListener
protected function getSession()
{
if (!$this->container->has('session')) {
return null;
return;
}
return $this->container->get('session');

View File

@ -481,7 +481,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
$definition = $this->getDefinition($id);
} catch (InvalidArgumentException $e) {
if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
return null;
return;
}
throw $e;

View File

@ -47,7 +47,7 @@ class RequestStack
public function pop()
{
if (!$this->requests) {
return null;
return;
}
return array_pop($this->requests);
@ -73,7 +73,7 @@ class RequestStack
public function getMasterRequest()
{
if (!$this->requests) {
return null;
return;
}
return $this->requests[0];
@ -95,7 +95,7 @@ class RequestStack
$pos = count($this->requests) - 2;
if (!isset($this->requests[$pos])) {
return null;
return;
}
return $this->requests[$pos];