Skip to content

Commit ca80e2c

Browse files
authored
Merge pull request #23 from cloudflare/cacheoncookie-patch
Correct input types for (Bypass) Cache on Cookie
2 parents 8ffd3e3 + d49028a commit ca80e2c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Configurations/PageRulesActions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function setBrowserIntegrityCheck(bool $active)
4040
]);
4141
}
4242

43-
public function setBypassCacheOnCookie(bool $value)
43+
public function setBypassCacheOnCookie(string $value)
4444
{
4545
if (preg_match('/^([a-zA-Z0-9\.=|_*-]+)$/i', $value) < 1) {
4646
throw new ConfigurationsException("Invalid cookie string.");
@@ -76,7 +76,7 @@ public function setCacheLevel(string $value)
7676
]);
7777
}
7878

79-
public function setCacheOnCookie(bool $value)
79+
public function setCacheOnCookie(string $value)
8080
{
8181
if (preg_match('/^([a-zA-Z0-9\.=|_*-]+)$/i', $value) < 1) {
8282
throw new ConfigurationsException("Invalid cookie string.");

tests/Endpoints/DNSTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ public function testUpdateDNSRecord()
9393
$mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->getMock();
9494
$mock->method('put')->willReturn($response);
9595

96-
$details = array(
96+
$details = [
9797
'type' => 'A',
9898
'name' => "example.com",
9999
'content' => "1.2.3.4",
100100
'ttl' => 120,
101101
'proxied' => false,
102-
);
102+
];
103103

104104
$mock->expects($this->once())
105105
->method('put')

0 commit comments

Comments
 (0)