Skip to content

Commit

Permalink
Added recommended syntax for the options array (#28)
Browse files Browse the repository at this point in the history
* Added recommended syntax for the options array

* Use more formal words

* Added changelog
  • Loading branch information
Nyholm authored Jan 18, 2020
1 parent dbf7374 commit b786f49
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.

## 3.0.1

Added comments on the `TransferableStorage` interface to describe the options parameter.

## 3.0.0

Allowing `Storage::get()` to return null. This has always been the intention but 2.0.0 was tagged with a bug
that could only be corrected with a BC break.
that could only be corrected with a BC break.

## 2.0.0

Expand Down
8 changes: 8 additions & 0 deletions src/TransferableStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ interface TransferableStorage
{
/**
* Get messages from the storage into the $catalogue.
*
* @var array a list of arbitrary options that could be used. The array SHOULD
* use a format of array<string, array<mixed $value>.
* Example: ['foo' => ['bar', 'baz]]
*/
public function export(MessageCatalogueInterface $catalogue, array $options = []): void;

/**
* Populate the storage with all the messages in $catalogue. This action
* should be considered as a "force merge". Existing messages in the storage
* will be overwritten but no message will be removed.
*
* @var array a list of arbitrary options that could be used. The array SHOULD
* use a format of array<string, array<mixed $value>.
* Example: ['foo' => ['bar', 'baz]]
*/
public function import(MessageCatalogueInterface $catalogue, array $options = []): void;
}

0 comments on commit b786f49

Please sign in to comment.