Skip to content

Commit

Permalink
qa: narrow some string types to non-empty-string
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
  • Loading branch information
boesing committed Jun 15, 2024
1 parent bf83c2a commit 00b58ad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Storage/ClearByNamespaceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ interface ClearByNamespaceInterface
{
/**
* Remove items of given namespace
*
* @param non-empty-string $namespace
*/
public function clearByNamespace(string $namespace): bool;
}
2 changes: 2 additions & 0 deletions src/Storage/ClearByPrefixInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ interface ClearByPrefixInterface
{
/**
* Remove items matching given prefix
*
* @param non-empty-string $prefix
*/
public function clearByPrefix(string $prefix): bool;
}
1 change: 1 addition & 0 deletions src/Storage/MetadataCapableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface MetadataCapableInterface
/**
* Get metadata of an item.
*
* @param non-empty-string $key
* @return TMetadata|null Metadata on success, null on failure or in case metadata is not accessible.
* @throws ExceptionInterface
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Storage/TaggableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ interface TaggableInterface
* Set tags to an item by given key.
* An empty array will remove all tags.
*
* @param non-empty-string $key
* @param string[] $tags
*/
public function setTags(string $key, array $tags): bool;

/**
* Get tags of an item by given key
*
* @param non-empty-string $key
* @return string[]|false
*/
public function getTags(string $key): false|array;
Expand Down

0 comments on commit 00b58ad

Please sign in to comment.