update kirby
This commit is contained in:
parent
652262ac94
commit
9c662bcbba
165 changed files with 1757 additions and 598 deletions
|
|
@ -149,7 +149,7 @@ class Dir
|
|||
string $dir,
|
||||
bool $recursive = false,
|
||||
array|false|null $ignore = [],
|
||||
string $path = null
|
||||
string|null $path = null
|
||||
): array {
|
||||
$result = [];
|
||||
$dir = realpath($dir);
|
||||
|
|
@ -434,7 +434,7 @@ class Dir
|
|||
*/
|
||||
public static function modified(
|
||||
string $dir,
|
||||
string $format = null,
|
||||
string|null $format = null,
|
||||
string|null $handler = null
|
||||
): int|string {
|
||||
$modified = filemtime($dir);
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ class File
|
|||
* @throws \Kirby\Exception\InvalidArgumentException When the model does not use the `Kirby\Filesystem\IsFile` trait
|
||||
*/
|
||||
public function __construct(
|
||||
array|string $props = null,
|
||||
string $url = null
|
||||
array|string|null $props = null,
|
||||
string|null $url = null
|
||||
) {
|
||||
// Legacy support for old constructor of
|
||||
// the `Kirby\Image\Image` class
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ class Mime
|
|||
/**
|
||||
* Returns the extension for a given MIME type
|
||||
*/
|
||||
public static function toExtension(string $mime = null): string|false
|
||||
public static function toExtension(string|null $mime = null): string|false
|
||||
{
|
||||
foreach (static::$types as $key => $value) {
|
||||
if (is_array($value) === true && in_array($mime, $value) === true) {
|
||||
|
|
@ -269,7 +269,7 @@ class Mime
|
|||
/**
|
||||
* Returns all available extensions for a given MIME type
|
||||
*/
|
||||
public static function toExtensions(string $mime = null, bool $matchWildcards = false): array
|
||||
public static function toExtensions(string|null $mime = null, bool $matchWildcards = false): array
|
||||
{
|
||||
$extensions = [];
|
||||
$testMime = fn (string $v) => static::matches($v, $mime);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue