8000 Merge branch '4.4' into 5.2 · symfony/symfony@ce2300a · GitHub
[go: up one dir, main page]

Skip to content

Commit ce2300a

Browse files
Merge branch '4.4' into 5.2
* 4.4: CS fix Missing translations from traits
2 parents 5da049d + 44f08fa commit ce2300a

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

src/Symfony/Component/Console/Input/Input.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ public function getArguments()
104104
/**
105105
* {@inheritdoc}
106106
*/
107-
public function getArgument($name)
107+
public function getArgument(string $name)
108108
{
109-
if (!$this->definition->hasArgument((string) $name)) {
109+
if (!$this->definition->hasArgument($name)) {
110110
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
111111
}
112112

@@ -116,9 +116,9 @@ public function getArgument($name)
116116
/**
117117
* {@inheritdoc}
118118
*/
119-
public function setArgument($name, $value)
119+
public function setArgument(string $name, $value)
120120
{
121-
if (!$this->definition->hasArgument((string) $name)) {
121+
if (!$this->definition->hasArgument($name)) {
122122
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
123123
}
124124

@@ -128,9 +128,9 @@ public function setArgument($name, $value)
128128
/**
129129
* {@inheritdoc}
130130
*/
131-
public function hasArgument($name)
131+
public function hasArgument(string $name)
132132
{
133-
return $this->definition->hasArgument((string) $name);
133+
return $this->definition->hasArgument($name);
134134
}
135135

136136
/**

src/Symfony/Component/Console/Input/InputInterface.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,32 +83,27 @@ public function getArguments();
8383
/**
8484
* Returns the argument value for a given argument name.
8585
*
86-
* @param string $name The argument name
87-
*
8886
* @return mixed
8987
*
9088
* @throws InvalidArgumentException When argument given doesn't exist
9189
*/
92-
public function getArgument($name);
90+
public function getArgument(string $name);
9391

9492
/**
9593
* Sets an argument value by name.
9694
*
97-
* @param string $name The argument name
98-
* @param mixed $value The argument value
95+
* @param mixed $value The argument value
9996
*
10097
* @throws InvalidArgumentException When argument given doesn't exist
10198
*/
102-
public function setArgument($name, $value);
99+
public function setArgument(string $name, $value);
103100

104101
/**
105102
* Returns true if an InputArgument object exists by name or position.
106103
*
107-
* @param string $name The InputArgument name or position
108-
*
109104
* @return bool true if the InputArgument object exists, false otherwise
110105
*/
111-
public function hasArgument($name);
106+
public function hasArgument(string $name);
112107

113108
/**
114109
* Returns all the given options merged with the default values.

src/Symfony/Component/Translation/DependencyInjection/TranslatorPathsPass.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public function process(ContainerBuilder $container)
6060
foreach ($this->paths as $class => $_) {
6161
if (($r = $container->getReflectionClass($class)) && !$r->isInterface()) {
6262
$paths[] = $r->getFileName();
63+
foreach ($r->getTraits() as $trait) {
64+
$paths[] = $trait->getFileName();
65+
}
6366
}
6467
}
6568
if ($paths) {

0 commit comments

Comments
 (0)
0