Skip to content

Commit 1a2a43d

Browse files
committed
[Console] [Helper] [Table] Minor fixes for individual columns styles
1 parent afc42e6 commit 1a2a43d

File tree

1 file changed

+2
-12
lines changed
  • src/Symfony/Component/Console/Helper

1 file changed

+2
-12
lines changed

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

+2-12
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,6 @@ public function getStyle()
154154
*/
155155
public function setColumnStyle($columnIndex, $name)
156156
{
157-
$isIndexValid = false;
158-
if (is_int($columnIndex)) {
159-
$isIndexValid = true;
160-
} elseif (is_string($columnIndex)) {
161-
$isIndexValid = ctype_digit($columnIndex);
162-
}
163-
164-
if (!$isIndexValid) {
165-
throw new \InvalidArgumentException(sprintf('Invalid column index: "%s".', $columnIndex));
166-
}
167-
168157
$columnIndex = intval($columnIndex);
169158

170159
if ($name instanceof TableStyle) {
@@ -179,7 +168,8 @@ public function setColumnStyle($columnIndex, $name)
179168
}
180169

181170
/**
182-
* Gets the current style for specified column.
171+
* Gets the current style for specified column,
172+
* if style was not set, returns global table style
183173
*
184174
* @param int $columnIndex Column index
185175
*

0 commit comments

Comments
 (0)