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

@ -54,7 +54,7 @@ class Content
*/
public function __construct(
array $data = [],
ModelWithContent $parent = null,
ModelWithContent|null $parent = null,
bool $normalize = true
) {
if ($normalize === true) {
@ -149,7 +149,7 @@ class Content
* Returns either a single field object
* or all registered fields
*/
public function get(string $key = null): Field|array
public function get(string|null $key = null): Field|array
{
if ($key === null) {
return $this->fields();
@ -234,7 +234,7 @@ class Content
* @return $this
*/
public function update(
array $content = null,
array|null $content = null,
bool $overwrite = false
): static {
$content = array_change_key_case((array)$content, CASE_LOWER);

View file

@ -145,7 +145,7 @@ class ContentTranslation
*
* @return $this
*/
public function update(array $data = null, bool $overwrite = false): static
public function update(array|null $data = null, bool $overwrite = false): static
{
$data = array_change_key_case((array)$data);

View file

@ -210,7 +210,7 @@ class Field
* the modified field will be returned. Otherwise it
* will return the field value.
*/
public function value(string|Closure $value = null): mixed
public function value(string|Closure|null $value = null): mixed
{
if ($value === null) {
return $this->value;