Skip to content

Commit a25153f

Browse files
committed
refactor: isCLI() does not use is_cli()
1 parent 388c4b5 commit a25153f

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
@@ -212,6 +212,6 @@ protected function parseCommand()
212212
*/
213213
public function isCLI(): bool
214214
{
215-
return is_cli();
215+
return true;
216216
}
217217
}

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
@@ -438,8 +438,7 @@ public function testCanGrabGetRawInput()
438438

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

445444
public function testIsAJAX()

0 commit comments

Comments
 (0)