Skip to content

Commit 873ba16

Browse files
committed
refactor: isCLI() does not use is_cli()
1 parent 069cb70 commit 873ba16

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

system/HTTP/CLIRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,6 @@ protected function parseCommand()
195195
*/
196196
public function isCLI(): bool
197197
{
198-
return is_cli();
198+
return true;
199199
}
200200
}

system/HTTP/IncomingRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function negotiate(string $type, array $supported, bool $strictMatch = fa
347347
*/
348348
public function isCLI(): bool
349349
{
350-
return is_cli();
350+
return false;
351351
}
352352

353353
/**

tests/system/HTTP/IncomingRequestTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ public function testCanGrabGetRawInput()
439439

440440
public function testIsCLI()
441441
{
442-
// this should be the case in unit testing
443-
$this->assertTrue($this->request->isCLI());
442+
$this->assertFalse($this->request->isCLI());
444443
}
445444

446445
public function testIsAJAX()

0 commit comments

Comments
 (0)