Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit c750d9d

Browse files
committed
CS fixes - spaces before colon in return type declaration
1 parent 395c19d commit c750d9d

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

src/AuthenticationInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ interface AuthenticationInterface
1616
* Authenticate the PSR-7 request and return a valid user
1717
* or null if not authenticated
1818
*/
19-
public function authenticate(ServerRequestInterface $request): ?UserInterface;
19+
public function authenticate(ServerRequestInterface $request) : ?UserInterface;
2020

2121
/**
2222
* Generate the unauthorized response
2323
*/
24-
public function unauthorizedResponse(ServerRequestInterface $request): ResponseInterface;
24+
public function unauthorizedResponse(ServerRequestInterface $request) : ResponseInterface;
2525
}

src/ResponsePrototypeTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ trait ResponsePrototypeTrait
1717
*
1818
* @throws Exception\InvalidConfigException
1919
*/
20-
protected function getResponsePrototype(ContainerInterface $container): ResponseInterface
20+
protected function getResponsePrototype(ContainerInterface $container) : ResponseInterface
2121
{
2222
if (! $container->has(ResponseInterface::class)
2323
&& ! class_exists(Response::class)

src/UserInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ interface UserInterface
1111
/**
1212
* Get the username
1313
*/
14-
public function getUsername(): string;
14+
public function getUsername() : string;
1515

1616
/**
1717
* Get the user role
1818
*/
19-
public function getUserRole(): string;
19+
public function getUserRole() : string;
2020
}

src/UserRepository/Htpasswd.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(string $filename)
3636
/**
3737
* {@inheritDoc}
3838
*/
39-
public function authenticate(string $credential, string $password = null): ?UserInterface
39+
public function authenticate(string $credential, string $password = null) : ?UserInterface
4040
{
4141
if (! $handle = fopen($this->filename, 'r')) {
4242
return null;
@@ -62,7 +62,7 @@ public function authenticate(string $credential, string $password = null): ?User
6262
* Check bcrypt usage for security reason
6363
*
6464
*/
65-
protected function checkBcryptHash(string $hash): void
65+
protected function checkBcryptHash(string $hash) : void
6666
{
6767
if ('$2y$' !== substr($hash, 0, 4)) {
6868
throw new Exception\RuntimeException(

src/UserRepository/PdoDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(PDO $pdo, array $config)
3131
/**
3232
* {@inheritDoc}
3333
*/
34-
public function authenticate(string $credential, string $password = null): ?UserInterface
34+
public function authenticate(string $credential, string $password = null) : ?UserInterface
3535
{
3636
$sql = sprintf(
3737
'SELECT * FROM %s WHERE %s = :username',

src/UserRepository/UserTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait UserTrait
1414
/**
1515
* Generate a user from $username and $role
1616
*/
17-
protected function generateUser(string $username, string $role): UserInterface
17+
protected function generateUser(string $username, string $role) : UserInterface
1818
{
1919
return new class($username, $role) implements UserInterface {
2020
public function __construct($username, $role)
@@ -23,12 +23,12 @@ public function __construct($username, $role)
2323
$this->role = $role;
2424
}
2525

26-
public function getUsername(): string
26+
public function getUsername() : string
2727
{
2828
return $this->username;
2929
}
3030

31-
public function getUserRole(): string
31+
public function getUserRole() : string
3232
{
3333
return $this->role;
3434
}

src/UserRepositoryInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ interface UserRepositoryInterface
1515
*
1616
* @param string $credential can be also a token
1717
*/
18-
public function authenticate(string $credential, string $password = null): ?UserInterface;
18+
public function authenticate(string $credential, string $password = null) : ?UserInterface;
1919
}

0 commit comments

Comments
 (0)