Skip to content

Commit 9e1a0f9

Browse files
committed
refactor: remove unneeded logic
It seems out of dated logic.
1 parent e6f380f commit 9e1a0f9

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

system/CLI/CommandRunner.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ public function __construct()
4848
*/
4949
public function _remap($method, $params)
5050
{
51-
// The first param is usually empty, so scrap it.
52-
if (empty($params[0])) {
53-
array_shift($params);
54-
}
55-
5651
return $this->index($params);
5752
}
5853

tests/system/CLI/CommandRunnerTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,4 @@ public function testBadCommand()
117117
// make sure the result looks like a command list
118118
$this->assertStringContainsString('Command "bogus" not found', CITestStreamFilter::$buffer);
119119
}
120-
121-
/**
122-
* @TODO When the first param is empty? Use case?
123-
*/
124-
public function testRemapEmptyFirstParams()
125-
{
126-
self::$runner->_remap('anyvalue', [null, 'list']);
127-
$result = CITestStreamFilter::$buffer;
128-
129-
// make sure the result looks like a command list
130-
$this->assertStringContainsString('Lists the available commands.', $result);
131-
}
132120
}

0 commit comments

Comments
 (0)