Skip to content

Commit 8da4820

Browse files
committed
Improve PHPDoc
1 parent e651a89 commit 8da4820

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/WebPush.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,15 @@ public function getReuseVAPIDHeaders()
338338

339339
/**
340340
* Reuse VAPID headers in the same flush session to improve performance
341+
* @param bool $enabled
342+
*
343+
* @return WebPush
341344
*/
342-
public function setReuseVAPIDHeaders($enabled)
345+
public function setReuseVAPIDHeaders(bool $enabled)
343346
{
344347
$this->reuseVAPIDHeaders = $enabled;
348+
349+
return $this;
345350
}
346351

347352
/**
@@ -354,13 +359,17 @@ public function getDefaultOptions(): array
354359

355360
/**
356361
* @param array $defaultOptions Keys 'TTL' (Time To Live, defaults 4 weeks), 'urgency', 'topic', 'batchSize'
362+
*
363+
* @return WebPush
357364
*/
358365
public function setDefaultOptions(array $defaultOptions)
359366
{
360367
$this->defaultOptions['TTL'] = isset($defaultOptions['TTL']) ? $defaultOptions['TTL'] : 2419200;
361368
$this->defaultOptions['urgency'] = isset($defaultOptions['urgency']) ? $defaultOptions['urgency'] : null;
362369
$this->defaultOptions['topic'] = isset($defaultOptions['topic']) ? $defaultOptions['topic'] : null;
363370
$this->defaultOptions['batchSize'] = isset($defaultOptions['batchSize']) ? $defaultOptions['batchSize'] : 1000;
371+
372+
return $this;
364373
}
365374

366375
/**

0 commit comments

Comments
 (0)