minor #33242 [DI] add return-types to generated containers (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[DI] add return-types to generated containers

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

A chunk of #33236 ready for 4.4

Commits
-------

917091955c [DI] add return-types to generated containers
This commit is contained in:
Fabien Potencier 2019-08-19 17:58:03 +02:00
commit b681e935ad
48 changed files with 350 additions and 610 deletions

View File

@ -1030,12 +1030,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/*{$this->docStar}
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class $class extends $baseClass
{
@ -1088,12 +1089,12 @@ EOF;
$code .= <<<EOF
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
@ -1184,7 +1185,7 @@ EOF;
return <<<EOF
public function getRemovedIds()
public function getRemovedIds(): array
{
return {$code};
}
@ -1363,7 +1364,7 @@ EOF;
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
if (isset($this->buildParameters[$name])) {
@ -1373,12 +1374,12 @@ EOF;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -1421,26 +1422,12 @@ EOF;
private \$loadedDynamicParameters = {$loadedDynamicParameters};
private \$dynamicParameters = [];
/*{$this->docStar}
* Computes a dynamic parameter.
*
* @param string \$name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter(\$name)
private function getDynamicParameter(string \$name)
{
{$getDynamicParameter}
}
/*{$this->docStar}
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return $parameters;
}

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Aliases_Deprecation extends Container
{
@ -31,17 +32,17 @@ class Symfony_DI_PhpDumper_Test_Aliases_Deprecation extends Container
];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -9,12 +9,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithoutArgumentsContainer
{
@ -31,17 +32,17 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -9,12 +9,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithMandatoryArgumentsContainer
{
@ -28,17 +29,17 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -9,12 +9,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithOptionalArgumentsContainer
{
@ -31,17 +32,17 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -9,12 +9,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\NoConstructorContainer
{
@ -28,17 +29,17 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -9,12 +9,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Container extends \Symfony\Component\DependencyInjection\Dump\AbstractContainer
{
@ -28,17 +29,17 @@ class Container extends \Symfony\Component\DependencyInjection\Dump\AbstractCont
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -26,17 +27,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -31,17 +32,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -73,19 +74,19 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -101,26 +102,12 @@ class ProjectServiceContainer extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'empty_value' => '',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -35,17 +36,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -77,19 +78,19 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -108,16 +109,7 @@ class ProjectServiceContainer extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'foo': $value = ('wiz'.$this->targetDirs[1]); break;
@ -129,12 +121,7 @@ class ProjectServiceContainer extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'bar' => __DIR__,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -29,17 +30,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -32,17 +33,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -88,19 +89,19 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -118,16 +119,7 @@ class ProjectServiceContainer extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'foo': $value = $this->getEnv('FOO'); break;
@ -138,12 +130,7 @@ class ProjectServiceContainer extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'env(FOO)' => 'Bar\\FaooClass',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -29,17 +30,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
{
@ -36,17 +37,17 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -88,19 +89,19 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -122,16 +123,7 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'bar': $value = $this->getEnv('FOO'); break;
@ -146,12 +138,7 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'project_dir' => '/foo/bar',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -30,17 +31,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -28,17 +29,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -60,19 +61,19 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -88,26 +89,12 @@ class ProjectServiceContainer extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'foo' => 'bar',

View File

@ -362,12 +362,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -426,17 +427,17 @@ class ProjectServiceContainer extends Container
];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
}
@ -479,7 +480,7 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
if (isset($this->buildParameters[$name])) {
@ -489,12 +490,12 @@ class ProjectServiceContainer extends Container
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -513,26 +514,12 @@ class ProjectServiceContainer extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'baz_class' => 'BazClass',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -59,17 +60,17 @@ class ProjectServiceContainer extends Container
];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -423,19 +424,19 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -451,26 +452,12 @@ class ProjectServiceContainer extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'baz_class' => 'BazClass',

View File

@ -28,12 +28,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -94,17 +95,17 @@ class ProjectServiceContainer extends Container
};
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
}
@ -477,7 +478,7 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
if (isset($this->buildParameters[$name])) {
@ -487,12 +488,12 @@ class ProjectServiceContainer extends Container
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -511,26 +512,12 @@ class ProjectServiceContainer extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'baz_class' => 'BazClass',

View File

@ -18,12 +18,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -50,17 +51,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
}
@ -113,7 +114,7 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
if (isset($this->buildParameters[$name])) {
@ -123,12 +124,12 @@ class ProjectServiceContainer extends Container
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -147,26 +148,12 @@ class ProjectServiceContainer extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'container.dumper.inline_factories' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -30,17 +31,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'App\\Handler1' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container
{
@ -46,17 +47,17 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container
{
@ -55,17 +56,17 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -35,17 +36,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -81,19 +82,19 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -111,16 +112,7 @@ class ProjectServiceContainer extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'array_2': $value = [
@ -133,12 +125,7 @@ class ProjectServiceContainer extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'array_1' => [

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container
{
@ -28,17 +29,17 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -60,19 +61,19 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -90,16 +91,7 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'hello': $value = $this->getEnv('base64:foo'); break;
@ -110,12 +102,7 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'env(foo)' => 'd29ybGQ=',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_CsvParameters extends Container
{
@ -28,17 +29,17 @@ class Symfony_DI_PhpDumper_Test_CsvParameters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -60,19 +61,19 @@ class Symfony_DI_PhpDumper_Test_CsvParameters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -90,16 +91,7 @@ class Symfony_DI_PhpDumper_Test_CsvParameters extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'hello': $value = $this->getEnv('csv:foo'); break;
@ -110,12 +102,7 @@ class Symfony_DI_PhpDumper_Test_CsvParameters extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'env(foo)' => 'foo,bar',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -30,17 +31,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Deep_Graph extends Container
{
@ -30,17 +31,17 @@ class Symfony_DI_PhpDumper_Test_Deep_Graph extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_DefaultParameters extends Container
{
@ -28,17 +29,17 @@ class Symfony_DI_PhpDumper_Test_DefaultParameters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -60,19 +61,19 @@ class Symfony_DI_PhpDumper_Test_DefaultParameters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -92,16 +93,7 @@ class Symfony_DI_PhpDumper_Test_DefaultParameters extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'fallback_env': $value = $this->getEnv('foobar'); break;
@ -114,12 +106,7 @@ class Symfony_DI_PhpDumper_Test_DefaultParameters extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'fallback_param' => 'baz',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -32,17 +33,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -86,19 +87,19 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -114,26 +115,12 @@ class ProjectServiceContainer extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'env(BAR)' => 'bar',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Errored_Definition extends Container
{
@ -59,17 +60,17 @@ class Symfony_DI_PhpDumper_Errored_Definition extends Container
];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -423,19 +424,19 @@ class Symfony_DI_PhpDumper_Errored_Definition extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -451,26 +452,12 @@ class Symfony_DI_PhpDumper_Errored_Definition extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'baz_class' => 'BazClass',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -44,17 +45,17 @@ class ProjectServiceContainer extends Container
};
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -110,19 +111,19 @@ class ProjectServiceContainer extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -138,26 +139,12 @@ class ProjectServiceContainer extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'inline_requires' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Inline_Self_Ref extends Container
{
@ -29,17 +30,17 @@ class Symfony_DI_PhpDumper_Test_Inline_Self_Ref extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_JsonParameters extends Container
{
@ -28,17 +29,17 @@ class Symfony_DI_PhpDumper_Test_JsonParameters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -60,19 +61,19 @@ class Symfony_DI_PhpDumper_Test_JsonParameters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -91,16 +92,7 @@ class Symfony_DI_PhpDumper_Test_JsonParameters extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'hello': $value = $this->getEnv('json:foo'); break;
@ -112,12 +104,7 @@ class Symfony_DI_PhpDumper_Test_JsonParameters extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'env(foo)' => '["foo","bar"]',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -36,17 +37,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -29,17 +30,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -34,12 +34,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -64,17 +65,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
}

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -30,17 +31,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -29,17 +30,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_QueryStringParameters extends Container
{
@ -28,17 +29,17 @@ class Symfony_DI_PhpDumper_Test_QueryStringParameters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -60,19 +61,19 @@ class Symfony_DI_PhpDumper_Test_QueryStringParameters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -90,16 +91,7 @@ class Symfony_DI_PhpDumper_Test_QueryStringParameters extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'hello': $value = $this->getEnv('query_string:foo'); break;
@ -110,12 +102,7 @@ class Symfony_DI_PhpDumper_Test_QueryStringParameters extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'env(foo)' => 'foo=bar&baz[]=qux',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container
{
@ -34,17 +35,17 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'.service_locator.GU08LT9' => true,
@ -91,19 +92,19 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -121,16 +122,7 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'hello': $value = $this->getEnv('rot13:foo'); break;
@ -141,12 +133,7 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'env(foo)' => 'jbeyq',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Service_Locator_Argument extends Container
{
@ -35,17 +36,17 @@ class Symfony_DI_PhpDumper_Service_Locator_Argument extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'.service_locator.38dy3OH' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -32,17 +33,17 @@ class ProjectServiceContainer extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'.service_locator.nZQiwdg' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class ProjectServiceContainer extends Container
{
@ -30,17 +31,17 @@ class ProjectServiceContainer extends Container
];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container
{
@ -31,17 +32,17 @@ class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_Unsupported_Characters extends Container
{
@ -33,17 +34,17 @@ class Symfony_DI_PhpDumper_Test_Unsupported_Characters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -95,19 +96,19 @@ class Symfony_DI_PhpDumper_Test_Unsupported_Characters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -123,26 +124,12 @@ class Symfony_DI_PhpDumper_Test_Unsupported_Characters extends Container
private $loadedDynamicParameters = [];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'\'' => 'oh-no',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Test_UrlParameters extends Container
{
@ -28,17 +29,17 @@ class Symfony_DI_PhpDumper_Test_UrlParameters extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,
@ -60,19 +61,19 @@ class Symfony_DI_PhpDumper_Test_UrlParameters extends Container
return $this->parameters[$name];
}
public function hasParameter($name)
public function hasParameter($name): bool
{
$name = (string) $name;
return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
public function setParameter($name, $value): void
{
throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
public function getParameterBag(): ParameterBagInterface
{
if (null === $this->parameterBag) {
$parameters = $this->parameters;
@ -90,16 +91,7 @@ class Symfony_DI_PhpDumper_Test_UrlParameters extends Container
];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
*
* @param string $name The name of the dynamic parameter to load
*
* @return mixed The value of the dynamic parameter
*
* @throws InvalidArgumentException When the dynamic parameter does not exist
*/
private function getDynamicParameter($name)
private function getDynamicParameter(string $name)
{
switch ($name) {
case 'hello': $value = $this->getEnv('url:foo'); break;
@ -110,12 +102,7 @@ class Symfony_DI_PhpDumper_Test_UrlParameters extends Container
return $this->dynamicParameters[$name] = $value;
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
protected function getDefaultParameters(): array
{
return [
'env(foo)' => 'postgres://user@localhost:5432/database?sslmode=disable',

View File

@ -7,12 +7,13 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
* @final
*/
class Symfony_DI_PhpDumper_Service_Wither extends Container
{
@ -29,17 +30,17 @@ class Symfony_DI_PhpDumper_Service_Wither extends Container
$this->aliases = [];
}
public function compile()
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
public function isCompiled(): bool
{
return true;
}
public function getRemovedIds()
public function getRemovedIds(): array
{
return [
'Psr\\Container\\ContainerInterface' => true,