update kirby

This commit is contained in:
isUnknown 2025-02-07 17:11:37 +01:00
parent 652262ac94
commit 9c662bcbba
165 changed files with 1757 additions and 598 deletions

View file

@ -776,7 +776,7 @@ class Page extends ModelWithContent
* This is only used for drafts so far.
* @internal
*/
public function isVerified(string $token = null): bool
public function isVerified(string|null $token = null): bool
{
if (
$this->isPublished() === true &&
@ -1091,7 +1091,7 @@ class Page extends ModelWithContent
*
* @return $this
*/
protected function setBlueprint(array $blueprint = null): static
protected function setBlueprint(array|null $blueprint = null): static
{
if ($blueprint !== null) {
$blueprint['model'] = $this;
@ -1106,7 +1106,7 @@ class Page extends ModelWithContent
*
* @return $this
*/
protected function setTemplate(string $template = null): static
protected function setTemplate(string|null $template = null): static
{
if ($template !== null) {
$this->intendedTemplate = $this->kirby()->template($template);
@ -1120,7 +1120,7 @@ class Page extends ModelWithContent
*
* @return $this
*/
protected function setUrl(string $url = null): static
protected function setUrl(string|null $url = null): static
{
if (is_string($url) === true) {
$url = rtrim($url, '/');
@ -1133,7 +1133,7 @@ class Page extends ModelWithContent
/**
* Returns the slug of the page
*/
public function slug(string $languageCode = null): string
public function slug(string|null $languageCode = null): string
{
if ($this->kirby()->multilang() === true) {
$languageCode ??= $this->kirby()->languageCode();
@ -1245,7 +1245,7 @@ class Page extends ModelWithContent
* The uri is the same as the id, except
* that it will be translated in multi-language setups
*/
public function uri(string $languageCode = null): string
public function uri(string|null $languageCode = null): string
{
// set the id, depending on the parent
if ($parent = $this->parent()) {
@ -1301,7 +1301,7 @@ class Page extends ModelWithContent
*/
public function urlForLanguage(
$language = null,
array $options = null
array|null $options = null
): string {
if ($options !== null) {
return Url::to($this->urlForLanguage($language), $options);