Merge branch '4.4' into 5.2
* 4.4: CS fix Missing translations from traits
This commit is contained in:
commit
ce2300a930
@ -104,9 +104,9 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getArgument($name)
|
public function getArgument(string $name)
|
||||||
{
|
{
|
||||||
if (!$this->definition->hasArgument((string) $name)) {
|
if (!$this->definition->hasArgument($name)) {
|
||||||
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
|
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,9 +116,9 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function setArgument($name, $value)
|
public function setArgument(string $name, $value)
|
||||||
{
|
{
|
||||||
if (!$this->definition->hasArgument((string) $name)) {
|
if (!$this->definition->hasArgument($name)) {
|
||||||
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
|
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,9 +128,9 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function hasArgument($name)
|
public function hasArgument(string $name)
|
||||||
{
|
{
|
||||||
return $this->definition->hasArgument((string) $name);
|
return $this->definition->hasArgument($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -83,32 +83,27 @@ interface InputInterface
|
|||||||
/**
|
/**
|
||||||
* Returns the argument value for a given argument name.
|
* Returns the argument value for a given argument name.
|
||||||
*
|
*
|
||||||
* @param string $name The argument name
|
|
||||||
*
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException When argument given doesn't exist
|
* @throws InvalidArgumentException When argument given doesn't exist
|
||||||
*/
|
*/
|
||||||
public function getArgument($name);
|
public function getArgument(string $name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an argument value by name.
|
* Sets an argument value by name.
|
||||||
*
|
*
|
||||||
* @param string $name The argument name
|
|
||||||
* @param mixed $value The argument value
|
* @param mixed $value The argument value
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException When argument given doesn't exist
|
* @throws InvalidArgumentException When argument given doesn't exist
|
||||||
*/
|
*/
|
||||||
public function setArgument($name, $value);
|
public function setArgument(string $name, $value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if an InputArgument object exists by name or position.
|
* Returns true if an InputArgument object exists by name or position.
|
||||||
*
|
*
|
||||||
* @param string $name The InputArgument name or position
|
|
||||||
*
|
|
||||||
* @return bool true if the InputArgument object exists, false otherwise
|
* @return bool true if the InputArgument object exists, false otherwise
|
||||||
*/
|
*/
|
||||||
public function hasArgument($name);
|
public function hasArgument(string $name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all the given options merged with the default values.
|
* Returns all the given options merged with the default values.
|
||||||
|
@ -60,6 +60,9 @@ class TranslatorPathsPass extends AbstractRecursivePass
|
|||||||
foreach ($this->paths as $class => $_) {
|
foreach ($this->paths as $class => $_) {
|
||||||
if (($r = $container->getReflectionClass($class)) && !$r->isInterface()) {
|
if (($r = $container->getReflectionClass($class)) && !$r->isInterface()) {
|
||||||
$paths[] = $r->getFileName();
|
$paths[] = $r->getFileName();
|
||||||
|
foreach ($r->getTraits() as $trait) {
|
||||||
|
$paths[] = $trait->getFileName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($paths) {
|
if ($paths) {
|
||||||
|
Reference in New Issue
Block a user