Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 28fca7c

Browse filesBrowse files
committed
[Console] Fix wrong exceptions being thrown
1 parent 38bbb57 commit 28fca7c
Copy full SHA for 28fca7c

File tree

Expand file treeCollapse file tree

2 files changed

+7
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/ProgressIndicator.php
+6-4Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/Table.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function setColumnStyle($columnIndex, $name)
162162
} elseif (isset(self::$styles[$name])) {
163163
$this->columnStyles[$columnIndex] = self::$styles[$name];
164164
} else {
165-
throw new \InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
165+
throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
166166
}
167167

168168
return $this;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.