Skip to content

Commit b786f49

Browse files
authored
Added recommended syntax for the options array (#28)
* Added recommended syntax for the options array * Use more formal words * Added changelog
1 parent dbf7374 commit b786f49

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Changelog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

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

5+
## 3.0.1
6+
7+
Added comments on the `TransferableStorage` interface to describe the options parameter.
8+
59
## 3.0.0
610

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

1014
## 2.0.0
1115

src/TransferableStorage.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,21 @@ interface TransferableStorage
2222
{
2323
/**
2424
* Get messages from the storage into the $catalogue.
25+
*
26+
* @var array a list of arbitrary options that could be used. The array SHOULD
27+
* use a format of array<string, array<mixed $value>.
28+
* Example: ['foo' => ['bar', 'baz]]
2529
*/
2630
public function export(MessageCatalogueInterface $catalogue, array $options = []): void;
2731

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

0 commit comments

Comments
 (0)