Skip to content

Commit

Permalink
Fix return definition for null values
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky committed Jan 18, 2024
1 parent fa4d2c4 commit 1e3fc4a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/Dto/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,24 @@ public function getCategories(): array
return $this->provideTranslation($this->categories);
}

public function getDescription(): string|TranslatableInterface
public function getDescription(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->description);
}

public function getName(): string|TranslatableInterface
public function getName(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->name);
}

#[SerializedName('short_name')]
public function getShortName(): string|TranslatableInterface
public function getShortName(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->shortName);
}

#[SerializedName('start_url')]
public function getStartUrl(): string|TranslatableInterface
public function getStartUrl(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->startUrl);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Dto/Screenshot.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class Screenshot

public null|string $format = null;

public function getLabel(): string|TranslatableInterface
public function getLabel(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->label);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Dto/ShareTargetParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ final class ShareTargetParameters
*/
public array $files = [];

public function getTitle(): string|TranslatableInterface
public function getTitle(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->title);
}

public function getText(): string|TranslatableInterface
public function getText(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->text);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Dto/Shortcut.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public function getName(): string|TranslatableInterface
}

#[SerializedName('short_name')]
public function getShortName(): string|TranslatableInterface
public function getShortName(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->shortName);
}

public function getDescription(): string|TranslatableInterface
public function getDescription(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->description);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Dto/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ public function getName(): string|TranslatableInterface
}

#[SerializedName('short_name')]
public function getShortName(): string|TranslatableInterface
public function getShortName(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->shortName);
}

public function getDescription(): string|TranslatableInterface
public function getDescription(): null|string|TranslatableInterface
{
return $this->provideTranslation($this->description);
}
Expand Down

0 comments on commit 1e3fc4a

Please sign in to comment.