@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | * @param LoggerInterface $logger Optional: PSR-3 Logger |
63 | 63 | * @param string $table Optional: Database table name |
64 | 64 | */ |
65 | - public function __construct( \PDO $pdo, Callable $password_verifier, LoggerInterface $logger = null, $table = null) |
|
65 | + public function __construct(\PDO $pdo, Callable $password_verifier, LoggerInterface $logger = null, $table = null) |
|
66 | 66 | { |
67 | 67 | $this->password_verifier = $password_verifier; |
68 | 68 | $this->logger = $logger ?: new NullLogger; |
69 | - $this->table = $table ?: $this->table; |
|
69 | + $this->table = $table ?: $this->table; |
|
70 | 70 | $this->uuid_factory = new UuidFactory; |
71 | 71 | |
72 | 72 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | LIMIT 1"; |
82 | 82 | |
83 | 83 | // Store for later use |
84 | - $this->stmt = $pdo->prepare( $sql ); |
|
84 | + $this->stmt = $pdo->prepare($sql); |
|
85 | 85 | |
86 | 86 | } |
87 | 87 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * |
94 | 94 | * @return mixed Array with User's ID, UUID, and API key, or FALSE on wrong credentials |
95 | 95 | */ |
96 | - public function __invoke( $login_name, $password ) |
|
96 | + public function __invoke($login_name, $password) |
|
97 | 97 | { |
98 | 98 | |
99 | 99 | // Perform |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | |
105 | 105 | // If user not found... |
106 | - $found_user = $this->stmt->fetch( \PDO::FETCH_ASSOC ); |
|
106 | + $found_user = $this->stmt->fetch(\PDO::FETCH_ASSOC); |
|
107 | 107 | if (!$found_user): |
108 | 108 | $this->logger->warning("User login name not found", [ |
109 | 109 | 'user_name' => $login_name |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | // If password is wrong... |
116 | 116 | $verifier = $this->password_verifier; |
117 | - if(!$verifier( $password, $found_user['password'])) : |
|
117 | + if (!$verifier($password, $found_user['password'])) : |
|
118 | 118 | |
119 | 119 | $this->logger->warning("Wrong password", [ |
120 | 120 | 'user_name' => $login_name |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | // Return found user data |
126 | 126 | $uuid_factory = $this->uuid_factory; |
127 | - $uuid = $uuid_factory->fromString( $found_user['uuid'] ); |
|
127 | + $uuid = $uuid_factory->fromString($found_user['uuid']); |
|
128 | 128 | |
129 | 129 | return [ |
130 | 130 | 'id' => $found_user['id'], |