diff --git a/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/README.md b/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/README.md index 2afc68a..30645be 100644 --- a/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/README.md +++ b/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/README.md @@ -19,7 +19,7 @@ class Tag << (F,LightGreen) >> #Green { + create(string $name, ?string $description) : ?array + update(string $tag, string $name, ...) : ?array + delete(string $tag) : ?array - - get(string $linker, string $name) : ?array + - get(string $linker, string $name) : ?object - createTag(string $linker, string $name, ...) : bool } @@ -65,7 +65,7 @@ note right of Tag::get Get a tag since: 2.0.1 - return: ?array + return: ?object end note note right of Tag::createTag diff --git a/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.php b/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.php index f63c48a..82f0a7c 100644 --- a/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.php +++ b/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.php @@ -173,6 +173,7 @@ final class Tag // update the description if it does not match $description = $description ?? ''; $description = trim($description); + $_tag->description = $_tag->description ?? ''; if ($_tag->description !== $description && $this->update->value($description, 'description', $_tag->id, 'id', 'tag')) { $_tag->description = $description; @@ -237,13 +238,13 @@ final class Tag * @param string $linker The linker GUID value * @param string $name The tag name * - * @return array|null Array of the tagged verse values on success + * @return object|null Array of the tagged verse values on success * @since 2.0.1 **/ private function get( string $linker, string $name - ): ?array + ): ?object { // get tag if it exist if (($tag = $this->load->item([ diff --git a/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.power b/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.power index 4cd933a..741ab12 100644 --- a/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.power +++ b/src/67f91b8b-7b48-4dbb-bbd5-7945c174622a/code.power @@ -144,6 +144,7 @@ // update the description if it does not match $description = $description ?? ''; $description = trim($description); + $_tag->description = $_tag->description ?? ''; if ($_tag->description !== $description && $this->update->value($description, 'description', $_tag->id, 'id', 'tag')) { $_tag->description = $description; @@ -208,13 +209,13 @@ * @param string $linker The linker GUID value * @param string $name The tag name * - * @return array|null Array of the tagged verse values on success + * @return object|null Array of the tagged verse values on success * @since 2.0.1 **/ private function get( string $linker, string $name - ): ?array + ): ?object { // get tag if it exist if (($tag = $this->load->item([