Skip to content

Commit d4ef047

Browse files
authored
Merge pull request #1471 from xerc/fix-exmpl
Fix return declarations @ example
2 parents 34a14d3 + 7b8fba9 commit d4ef047

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

examples/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# Example implementations
1+
# Example implementations (via [`Slim 3`](https://github.com/slimphp/Slim/tree/3.x))
22

33
## Installation
44

55
0. Run `composer install` in this directory to install dependencies
66
0. Create a private key `openssl genrsa -out private.key 2048`
7-
0. Create a public key `openssl rsa -in private.key -pubout > public.key`
8-
0. `cd` into the public directory
9-
0. Start a PHP server `php -S localhost:4444`
7+
0. Export the public key `openssl rsa -in private.key -pubout > public.key`
8+
0. Start local PHP server `php -S 127.0.0.1:4444 -t public/`
109

1110
## Testing the client credentials grant example
1211

examples/src/Repositories/AuthCodeRepository.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,31 @@ class AuthCodeRepository implements AuthCodeRepositoryInterface
2121
/**
2222
* {@inheritdoc}
2323
*/
24-
public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity)
24+
public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity): void
2525
{
2626
// Some logic to persist the auth code to a database
2727
}
2828

2929
/**
3030
* {@inheritdoc}
3131
*/
32-
public function revokeAuthCode($codeId)
32+
public function revokeAuthCode($codeId): void
3333
{
3434
// Some logic to revoke the auth code in a database
3535
}
3636

3737
/**
3838
* {@inheritdoc}
3939
*/
40-
public function isAuthCodeRevoked($codeId)
40+
public function isAuthCodeRevoked($codeId): bool
4141
{
4242
return false; // The auth code has not been revoked
4343
}
4444

4545
/**
4646
* {@inheritdoc}
4747
*/
48-
public function getNewAuthCode()
48+
public function getNewAuthCode(): AuthCodeEntityInterface
4949
{
5050
return new AuthCodeEntity();
5151
}

0 commit comments

Comments
 (0)