Skip to content

Commit

Permalink
Merge pull request #1 from matt-harvey/fix-return-type-deprecation
Browse files Browse the repository at this point in the history
Fix warning re. return type on PHP 8.1 upgrade
  • Loading branch information
cherifGsoul authored Jan 4, 2022
2 parents 78e07cb + 077283e commit cc3e41d
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions src/Model/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ public static function create()
return new Page();
}

/**
*
*/
public function getComponent(): string
{
return $this->component;
}

/**
*
*/
public function withComponent(string $component): self
{
$page = clone $this;
Expand All @@ -50,17 +44,11 @@ public function withComponent(string $component): self
}


/**
*
*/
public function getProps(): array
{
return $this->props;
}

/**
*
*/
public function withProps(array $props): self
{
$page = clone $this;
Expand All @@ -73,35 +61,27 @@ public function getUrl(): ?string
return $this->url;
}

/**
*
*/
public function withUrl(string $url): self
{
$page = clone $this;
$page->url = $url;
return $page;
}

/**
*
*/
public function getVersion(): ?string
{
return $this->version;
}

/**
*
*/
public function withVersion(string $version): self
{
$page = clone $this;
$page->version = $version;
return $page;
}

public function jsonSerialize()
/** @return array<string, mixed> */
public function jsonSerialize(): array
{
return [
'component' => $this->getComponent(),
Expand All @@ -117,4 +97,4 @@ public function addProp(string $key, $value = null)
$page->props[$key] = $value;
return $page;
}
}
}

0 comments on commit cc3e41d

Please sign in to comment.