Skip to content

Commit

Permalink
Coding style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbestle committed Sep 13, 2022
1 parent acdd4c2 commit e26d7fd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Cms/FileActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public static function create(array $props)

// gather content
$content = $props['content'] ?? [];

// make sure that a UUID gets generated and
// added to content right away
$content['uuid'] = Uuid::generate();
Expand Down
1 change: 1 addition & 0 deletions src/Cms/PageActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ public static function create(array $props)

// gather content
$content = $props['content'] ?? [];

// make sure that a UUID gets generated and
// added to content right away
$content['uuid'] = Uuid::generate();
Expand Down
2 changes: 1 addition & 1 deletion src/Text/KirbyTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function file(string $path): File|null
$context = $parent->files();
}

return Uuid::for($path, $context ?? null)->resolve();
return Uuid::for($path, $context ?? null)->resolve();
}

if (
Expand Down
2 changes: 1 addition & 1 deletion src/Uuid/HasUuids.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function findByUuid(
string|null $schema = null
): Identifiable|null {
if (Uuid::is($uuid, $schema) === true) {
// Look up model by UUID while prioritizing
// look up model by UUID while prioritizing
// $this collection when searching
return Uuid::for($uuid, $this)->resolve();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Uuid/Uuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ final public static function is(
}

// try to match any of the supported schemes
$pattern = sprintf('/^(%s):\/\//', implode('|', Uri::$schemes));
$pattern = sprintf('!^(%s)://!', implode('|', Uri::$schemes));
return preg_match($pattern, $string) === 1;
}

Expand Down

0 comments on commit e26d7fd

Please sign in to comment.