| 1 | <?php |
||
| 6 | class MemorySequenceRepository implements SequenceRepositoryInterface |
||
| 7 | { |
||
| 8 | /** @var \BWC\Share\Data\Sequence\SequenceGeneratorInterface */ |
||
| 9 | private $_generator; |
||
| 10 | |||
| 11 | /** @var array name => value => true */ |
||
| 12 | private $_data = array(); |
||
| 13 | |||
| 14 | |||
| 15 | |||
| 16 | function __construct(SequenceGeneratorInterface $generator) { |
||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $name |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | function generate($name = 'default') { |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $value |
||
| 40 | * @param string $name |
||
| 41 | * @return bool |
||
| 42 | */ |
||
| 43 | function exists($value, $name = 'default') { |
||
| 46 | |||
| 47 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.