Skip to content

Commit 3c4a51a

Browse files
committed
Minor refactoring work
testColumnInRange method renamed to isColumnInRange
1 parent 3a6ebc0 commit 3c4a51a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/PhpSpreadsheet/Worksheet/Table.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function getColumns()
272272
*
273273
* @return int The column offset within the table range
274274
*/
275-
public function testColumnInRange($column)
275+
public function isColumnInRange($column)
276276
{
277277
if (empty($this->range)) {
278278
throw new PhpSpreadsheetException('No table range is defined.');
@@ -296,7 +296,7 @@ public function testColumnInRange($column)
296296
*/
297297
public function getColumnOffset($column)
298298
{
299-
return $this->testColumnInRange($column);
299+
return $this->isColumnInRange($column);
300300
}
301301

302302
/**
@@ -308,7 +308,7 @@ public function getColumnOffset($column)
308308
*/
309309
public function getColumn($column)
310310
{
311-
$this->testColumnInRange($column);
311+
$this->isColumnInRange($column);
312312

313313
if (!isset($this->columns[$column])) {
314314
$this->columns[$column] = new Table\Column($column, $this);
@@ -349,7 +349,7 @@ public function setColumn($columnObjectOrString)
349349
} else {
350350
throw new PhpSpreadsheetException('Column is not within the table range.');
351351
}
352-
$this->testColumnInRange($column);
352+
$this->isColumnInRange($column);
353353

354354
if (is_string($columnObjectOrString)) {
355355
$this->columns[$columnObjectOrString] = new Table\Column($columnObjectOrString, $this);
@@ -371,7 +371,7 @@ public function setColumn($columnObjectOrString)
371371
*/
372372
public function clearColumn($column)
373373
{
374-
$this->testColumnInRange($column);
374+
$this->isColumnInRange($column);
375375

376376
if (isset($this->columns[$column])) {
377377
unset($this->columns[$column]);

src/PhpSpreadsheet/Worksheet/Table/Column.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function setColumnIndex($column)
8989
// Uppercase coordinate
9090
$column = strtoupper($column);
9191
if ($this->table !== null) {
92-
$this->table->testColumnInRange($column);
92+
$this->table->isColumnInRange($column);
9393
}
9494

9595
$this->columnIndex = $column;

0 commit comments

Comments
 (0)