Skip to content

Commit 1685ee7

Browse files
committed
fix implicitly nullable via default value null
Signed-off-by: Benjamin Brahmer <[email protected]>
1 parent 6d3cb35 commit 1685ee7

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/Db/Item.php

+17-17
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public function jsonSerialize(): array
392392
];
393393
}
394394

395-
public function setAuthor(string $author = null): self
395+
public function setAuthor(?string $author = null): self
396396
{
397397
if (!is_null($author)) {
398398
$author = strip_tags($author);
@@ -406,7 +406,7 @@ public function setAuthor(string $author = null): self
406406
return $this;
407407
}
408408

409-
public function setBody(string $body = null): self
409+
public function setBody(?string $body = null): self
410410
{
411411
// FIXME: this should not happen if the target="_blank" is already
412412
// on the link
@@ -420,7 +420,7 @@ public function setBody(string $body = null): self
420420
return $this;
421421
}
422422

423-
public function setContentHash(string $contentHash = null): self
423+
public function setContentHash(?string $contentHash = null): self
424424
{
425425
if ($this->contentHash !== $contentHash) {
426426
$this->contentHash = $contentHash;
@@ -430,7 +430,7 @@ public function setContentHash(string $contentHash = null): self
430430
return $this;
431431
}
432432

433-
public function setEnclosureLink(string $enclosureLink = null): self
433+
public function setEnclosureLink(?string $enclosureLink = null): self
434434
{
435435
if ($this->enclosureLink !== $enclosureLink) {
436436
$this->enclosureLink = $enclosureLink;
@@ -440,7 +440,7 @@ public function setEnclosureLink(string $enclosureLink = null): self
440440
return $this;
441441
}
442442

443-
public function setEnclosureMime(string $enclosureMime = null): self
443+
public function setEnclosureMime(?string $enclosureMime = null): self
444444
{
445445
if ($this->enclosureMime !== $enclosureMime) {
446446
$this->enclosureMime = $enclosureMime;
@@ -450,7 +450,7 @@ public function setEnclosureMime(string $enclosureMime = null): self
450450
return $this;
451451
}
452452

453-
public function setMediaThumbnail(string $mediaThumbnail = null): self
453+
public function setMediaThumbnail(?string $mediaThumbnail = null): self
454454
{
455455
if ($this->mediaThumbnail !== $mediaThumbnail) {
456456
$this->mediaThumbnail = $mediaThumbnail;
@@ -460,7 +460,7 @@ public function setMediaThumbnail(string $mediaThumbnail = null): self
460460
return $this;
461461
}
462462

463-
public function setMediaDescription(string $mediaDescription = null): self
463+
public function setMediaDescription(?string $mediaDescription = null): self
464464
{
465465
if ($this->mediaDescription !== $mediaDescription) {
466466
$this->mediaDescription = $mediaDescription;
@@ -480,7 +480,7 @@ public function setFeedId(int $feedId): self
480480
return $this;
481481
}
482482

483-
public function setFingerprint(string $fingerprint = null): self
483+
public function setFingerprint(?string $fingerprint = null): self
484484
{
485485
if ($this->fingerprint !== $fingerprint) {
486486
$this->fingerprint = $fingerprint;
@@ -510,7 +510,7 @@ public function setGuidHash(string $guidHash): self
510510
return $this;
511511
}
512512

513-
public function setLastModified(string $lastModified = null): self
513+
public function setLastModified(?string $lastModified = null): self
514514
{
515515
if ($this->lastModified !== $lastModified) {
516516
$this->lastModified = $lastModified;
@@ -520,7 +520,7 @@ public function setLastModified(string $lastModified = null): self
520520
return $this;
521521
}
522522

523-
public function setPubDate(int $pubDate = null): self
523+
public function setPubDate(?int $pubDate = null): self
524524
{
525525
if ($this->pubDate !== $pubDate) {
526526
$this->pubDate = $pubDate;
@@ -540,7 +540,7 @@ public function setRtl(bool $rtl): self
540540
return $this;
541541
}
542542

543-
public function setSearchIndex(string $searchIndex = null): self
543+
public function setSearchIndex(?string $searchIndex = null): self
544544
{
545545
if ($this->searchIndex !== $searchIndex) {
546546
$this->searchIndex = $searchIndex;
@@ -560,7 +560,7 @@ public function setStarred(bool $starred): self
560560
return $this;
561561
}
562562

563-
public function setTitle(string $title = null): self
563+
public function setTitle(?string $title = null): self
564564
{
565565
if (!is_null($title)) {
566566
$title = trim(strip_tags($title));
@@ -574,7 +574,7 @@ public function setTitle(string $title = null): self
574574
return $this;
575575
}
576576

577-
public function setSharedBy(string $sharedBy = null): self
577+
public function setSharedBy(?string $sharedBy = null): self
578578
{
579579
if ($this->sharedBy !== $sharedBy) {
580580
$this->sharedBy = $sharedBy;
@@ -584,7 +584,7 @@ public function setSharedBy(string $sharedBy = null): self
584584
return $this;
585585
}
586586

587-
public function setSharedByDisplayName(string $sharedByDisplayName = null): self
587+
public function setSharedByDisplayName(?string $sharedByDisplayName = null): self
588588
{
589589
if ($this->sharedByDisplayName !== $sharedByDisplayName) {
590590
$this->sharedByDisplayName = $sharedByDisplayName;
@@ -603,7 +603,7 @@ public function setUnread(bool $unread): self
603603
return $this;
604604
}
605605

606-
public function setUrl(string $url = null): self
606+
public function setUrl(?string $url = null): self
607607
{
608608
if (is_null($url)) {
609609
return $this;
@@ -620,7 +620,7 @@ public function setUrl(string $url = null): self
620620
return $this;
621621
}
622622

623-
public function setCategoriesJson(string $categoriesJson = null): self
623+
public function setCategoriesJson(?string $categoriesJson = null): self
624624
{
625625
if ($this->categoriesJson !== $categoriesJson) {
626626
$this->categoriesJson = $categoriesJson;
@@ -630,7 +630,7 @@ public function setCategoriesJson(string $categoriesJson = null): self
630630
return $this;
631631
}
632632

633-
public function setCategories(array $categories = null): self
633+
public function setCategories(?array $categories = null): self
634634
{
635635
$categoriesJson = !is_null($categories) ? json_encode($categories) : null;
636636
$this->setCategoriesJson($categoriesJson);

0 commit comments

Comments
 (0)