Skip to content

Commit b53804d

Browse files
Updated readme with documentation on the clock Option.
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
1 parent ccb0c24 commit b53804d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ composer require personnummer/personnummer
4141
When a personnummer is invalid a PersonnummerException is thrown.
4242

4343
## Options
44-
| Option | Type | Default | Description |
45-
|-------------------------|:-----|:--------|:---------------------------:|
46-
| allowCoordinationNumber | bool | true | Accept coordination numbers |
47-
| allowInterimNumber | bool | false | Accept interim/T numbers |
44+
| Option | Type | Default | Description |
45+
|-------------------------|:-------------------------|:------------------------|:----------------------------------|
46+
| allowCoordinationNumber | bool | true | Accept coordination numbers |
47+
| allowInterimNumber | bool | false | Accept interim/T numbers |
48+
| clock | Psr\Clock\ClockInterface | Personummer\SystemClock | Clock used for time calculations |
4849

4950
## Examples
5051

src/Personnummer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private static function luhn(string $str): int
193193
public function __construct(string $ssn, array $options = [])
194194
{
195195
$this->options = $this->parseOptions($options);
196-
$this->clock = $this->options['clock'];
196+
$this->clock = $this->options['clock'];
197197
$this->parts = self::getParts($ssn);
198198

199199
// Sanity checks.

0 commit comments

Comments
 (0)