We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08e9377 commit a338610Copy full SHA for a338610
2 files changed
system/HTTP/CLIRequest.php
@@ -304,4 +304,15 @@ public function getLocale(): string
304
{
305
return Locale::getDefault();
306
}
307
+
308
+ /**
309
+ * Checks this request type.
310
+ *
311
+ * @param string $type HTTP verb or 'json' or 'ajax'
312
+ * @phpstan-param string|'get'|'post'|'put'|'delete'|'head'|'patch'|'options'|'json'|'ajax' $type
313
+ */
314
+ public function is(string $type): bool
315
+ {
316
+ return false;
317
+ }
318
tests/system/HTTP/CLIRequestTest.php
@@ -625,4 +625,9 @@ public function testGetCookie()
625
626
$this->assertSame($this->request->getCookie(), []);
627
628
629
+ public function testIs()
630
631
+ $this->assertFalse($this->request->is('get'));
632
633
0 commit comments