8000 Merge branch '3.0' · symfony/symfony@44c3e32 · GitHub
[go: up one dir, main page]

Skip to content

Commit 44c3e32

Browse files
committed
Merge branch '3.0'
* 3.0: [Console] Fix wrong exceptions being thrown Add missing parenthesis in docblock description [FrameworkBundle] Remove duplicated code in ContainerDebugCommand
2 parents b26ff03 + dd3e510 commit 44c3e32

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php

Lines changed: 2 additions & 6 deletions
10000
Original file line numberDiff line numberDiff line change
@@ -93,25 +93,21 @@ protected function execute(InputInterface $input, OutputInterface $output)
9393
{
9494
$io = new SymfonyStyle($input, $output);
9595
$this->validateInput($input);
96+
$object = $this->getContainerBuilder();
9697

9798
if ($input->getOption('parameters')) {
98-
$object = $this->getContainerBuilder()->getParameterBag();
99+
$object = $object->getParameterBag();
99100
$options = array();
100101
} elseif ($parameter = $input->getOption('parameter')) {
101-
$object = $this->getContainerBuilder();
102102
$options = array('parameter' => $parameter);
103103
} elseif ($input->getOption('tags')) {
104-
$object = $this->getContainerBuilder();
105104
$options = array('group_by' => 'tags', 'show_private' => $input->getOption('show-private'));
106105
} elseif ($tag = $input->getOption('tag')) {
107-
$object = $this->getContainerBuilder();
108106
$options = array('tag' => $tag, 'show_private' => $input->getOption('show-private'));
109107
} elseif ($name = $input->getArgument('name')) {
110-
$object = $this->getContainerBuilder();
111108
$name = $this->findProperServiceName($input, $io, $object, $name);
112109
$options = array('id' => $name);
113110
} else {
114-
$object = $this->getContainerBuilder();
115111
$options = array('show_private' => $input->getOption('show-private'));
116112
}
117113

src/Symfony/Component/Console/Helper/ProgressIndicator.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Console\Helper;
1313

14+
use Symfony\Component\Console\Exception\InvalidArgumentException;
15+
use Symfony\Component\Console\Exception\LogicException;
1416
use Symfony\Component\Console\Output\OutputInterface;
1517

1618
/**
@@ -53,7 +55,7 @@ public function __construct(OutputInterface $output, $format = null, $indicatorC
5355
$indicatorValues = array_values($indicatorValues);
5456

5557
if (2 > count($indicatorValues)) {
56-
throw new \InvalidArgumentException('Must have at least 2 indicator value characters.');
58+
throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
5759
}
5860

5961
$this->format = self::getFormatDefinition($format);
@@ -118,7 +120,7 @@ public function getCurrentValue()
118120
public function start($message)
119121
{
120122
if ($this->started) {
121-
throw new \LogicException('Progress indicator already started.');
123+
throw new LogicException('Progress indicator already started.');
122124
}
123125

124126
$this->message = $message;
@@ -137,7 +139,7 @@ public function start($message)
137139
public function advance()
138140
{
139141
if (!$this->started) {
140-
throw new \LogicException('Progress indicator has not yet been started.');
142+
throw new LogicException('Progress indicator has not yet been started.');
141143
}
142144

143145
if (!$this->output->isDecorated()) {
@@ -164,7 +166,7 @@ public function advance()
164166
public function finish($message)
165167
{
166168
if (!$this->started) {
167-
throw new \LogicException('Progress indicator has not yet been started.');
169+
throw new LogicException('Progress indicator has not yet been started.');
168170
}
169171

170172
$this->message = $message;

src/Symfony/Component/Console/Helper/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function setColumnStyle($columnIndex, $name)
169169
} elseif (isset(self::$styles[$name])) {
170170
$this->columnStyles[$columnIndex] = self::$styles[$name];
171171
} else {
172-
throw new \InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
172+
throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
173173
}
174174

175175
return $this;

src/Symfony/Component/Routing/RouteCollectionBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function setCondition($condition)
170170

171171
/**
172172
* Sets a default value that will be added to all embedded routes (unless that
173-
* default value is already set.
173+
* default value is already set).
174174
*
175175
* @param string $key
176176
* @param mixed $value
@@ -186,7 +186,7 @@ public function setDefault($key, $value)
186186

187187
/**
188188
* Sets a requirement that will be added to all embedded routes (unless that
189-
* requirement is already set.
189+
* requirement is already set).
190190
*
191191
* @param string $key
192192
* @param mixed $regex
@@ -202,7 +202,7 @@ public function setRequirement($key, $regex)
202202

203203
/**
204204
* Sets an opiton that will be added to all embedded routes (unless that
205-
* option is already set.
205+
* option is already set).
206206
*
207207
* @param string $key
208208
* @param mixed $value

0 commit comments

Comments
 (0)
0