Skip to content

Commit

Permalink
fix: Fixes README.md and updates dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavofreze authored Jun 17, 2023
1 parent 848e244 commit fa1a85c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ and a payload (_cryptographically secure pseudo-random bytes_).
```php
$ksuid = Ksuid::random();

echo $ksuid->getValue(); # 2QzPUGEaAKHhVcQYrqQodbiZat1
echo $ksuid->getPayload(); # 464932c1194da98e752145d72b8f0aab
echo $ksuid->getUnixTime(); # 1686353450
echo $ksuid->getTimestamp(); # 286353450
$ksuid->getValue(); # 2QzPUGEaAKHhVcQYrqQodbiZat1
$ksuid->getPayload(); # 464932c1194da98e752145d72b8f0aab
$ksuid->getUnixTime(); # 1686353450
$ksuid->getTimestamp(); # 286353450
```

You can also choose from other factory models.
Expand All @@ -59,19 +59,19 @@ Ksuid::fromTimestamp(value: 286235327);
You can inspect the components used to create a `Ksuid`, using the `inspectFrom` method.

```php
$ksuid = Ksuid::inspectFrom(ksuid: '2QzPUGEaAKHhVcQYrqQodbiZat1');

print_r($ksuid); # Array
# (
# [time] => 2023-06-09 20:30:50 -0300 -03
# [payload] => 464932c1194da98e752145d72b8f0aab
# [timestamp] => 286353450
# )
$ksuid = Ksuid::inspectFrom(ksuid: '2QzPUGEaAKHhVcQYrqQodbiZat1'); # Array
# (
# [time] => 2023-06-09 20:30:50 -0300 -03
# [payload] => 464932c1194da98e752145d72b8f0aab
# [timestamp] => 286353450
# )
```

<div id='license'></div>

## License

Math is licensed under [MIT](/LICENSE).
Ksuid is licensed under [MIT](LICENSE).

<div id='contributing'></div>

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
},
"require-dev": {
"infection/infection": "^0.26",
"phpmd/phpmd": "^2.12",
"phpunit/phpunit": "^9.5",
"phpmd/phpmd": "^2.13",
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.7"
},
"suggest": {
Expand Down

0 comments on commit fa1a85c

Please sign in to comment.