@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | public function getFullName(); |
| 14 | 14 | |
| 15 | - public function setDisplayName( $name ); |
|
| 15 | + public function setDisplayName($name); |
|
| 16 | 16 | public function getDisplayName(); |
| 17 | 17 | |
| 18 | 18 | public function setFirstName($name); |
@@ -24,11 +24,11 @@ discard block |
||
| 24 | 24 | public function setLoginName($name); |
| 25 | 25 | public function getLoginName(); |
| 26 | 26 | |
| 27 | - public function setEmail( $email); |
|
| 27 | + public function setEmail($email); |
|
| 28 | 28 | public function getEmail(); |
| 29 | 29 | |
| 30 | 30 | public function getApiKey(); |
| 31 | - public function setApiKey( $key ); |
|
| 31 | + public function setApiKey($key); |
|
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | } |
@@ -15,10 +15,10 @@ discard block |
||
| 15 | 15 | * @throws UserNotFoundException |
| 16 | 16 | * @uses $users |
| 17 | 17 | */ |
| 18 | - public function get( $id ) |
|
| 18 | + public function get($id) |
|
| 19 | 19 | { |
| 20 | - if ($this->has( $id )) { |
|
| 21 | - return $this->users[ $id ]; |
|
| 20 | + if ($this->has($id)) { |
|
| 21 | + return $this->users[$id]; |
|
| 22 | 22 | } |
| 23 | 23 | throw new UserNotFoundException("Could not find User with ID '$id'"); |
| 24 | 24 | } |
@@ -28,9 +28,9 @@ discard block |
||
| 28 | 28 | * @return boolean |
| 29 | 29 | * @uses $users |
| 30 | 30 | */ |
| 31 | - public function has ($id ) |
|
| 31 | + public function has($id) |
|
| 32 | 32 | { |
| 33 | - return array_key_exists( $id, $this->users); |
|
| 33 | + return array_key_exists($id, $this->users); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function getIterator() |
| 43 | 43 | { |
| 44 | - return new \ArrayIterator( $this->users ); |
|
| 44 | + return new \ArrayIterator($this->users); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @param UserAbstract $user Optional: User template object |
| 22 | 22 | * @param string $table Optional: Users table name |
| 23 | 23 | */ |
| 24 | - public function __construct( \PDO $pdo, UserAbstract $user = null, $table = null ) |
|
| 24 | + public function __construct(\PDO $pdo, UserAbstract $user = null, $table = null) |
|
| 25 | 25 | { |
| 26 | 26 | $this->table = $table ?: $this->table; |
| 27 | 27 | |
@@ -39,9 +39,9 @@ discard block |
||
| 39 | 39 | FROM {$this->table} |
| 40 | 40 | WHERE is_active > 0"; |
| 41 | 41 | |
| 42 | - $stmt = $pdo->prepare( $sql ); |
|
| 42 | + $stmt = $pdo->prepare($sql); |
|
| 43 | 43 | |
| 44 | - $stmt->setFetchMode( \PDO::FETCH_CLASS, $user ? get_class($user) : User::class ); |
|
| 44 | + $stmt->setFetchMode(\PDO::FETCH_CLASS, $user ? get_class($user) : User::class); |
|
| 45 | 45 | |
| 46 | 46 | if (!$stmt->execute()): |
| 47 | 47 | throw new \RuntimeException("Could not retrieve Users from database"); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @param UserAbstract $user Optional: User template object |
| 30 | 30 | * @param string $table Optional: Users table name |
| 31 | 31 | */ |
| 32 | - public function __construct( \PDO $pdo, UserAbstract $user = null, $table = null ) |
|
| 32 | + public function __construct(\PDO $pdo, UserAbstract $user = null, $table = null) |
|
| 33 | 33 | { |
| 34 | 34 | $this->pdo = $pdo; |
| 35 | 35 | $this->table = $table ?: $this->table; |
@@ -49,14 +49,14 @@ discard block |
||
| 49 | 49 | WHERE U.id = :id |
| 50 | 50 | AND U.is_active > 0"; |
| 51 | 51 | |
| 52 | - $this->stmt = $pdo->prepare( $sql ); |
|
| 52 | + $this->stmt = $pdo->prepare($sql); |
|
| 53 | 53 | |
| 54 | - $this->stmt->setFetchMode( \PDO::FETCH_CLASS, $user ? get_class($user) : User::class ); |
|
| 54 | + $this->stmt->setFetchMode(\PDO::FETCH_CLASS, $user ? get_class($user) : User::class); |
|
| 55 | 55 | |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | |
| 59 | - public function has ($id) { |
|
| 59 | + public function has($id) { |
|
| 60 | 60 | if (!$this->stmt->execute([ |
| 61 | 61 | 'id' => $id |
| 62 | 62 | ])): |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | |
| 70 | - public function get ($id) { |
|
| 70 | + public function get($id) { |
|
| 71 | 71 | if (!$this->stmt->execute([ |
| 72 | 72 | 'id' => $id |
| 73 | 73 | ])): |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | * @param mixed $email |
| 126 | 126 | * @return self |
| 127 | 127 | */ |
| 128 | - public function setEmail( $email) |
|
| 128 | + public function setEmail($email) |
|
| 129 | 129 | { |
| 130 | 130 | $this->email = $email; |
| 131 | 131 | return $this; |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * @return self |
| 162 | 162 | * @uses $api_key |
| 163 | 163 | */ |
| 164 | - public function setApiKey( $key ) |
|
| 164 | + public function setApiKey($key) |
|
| 165 | 165 | { |
| 166 | 166 | $this->api_key = $key; |
| 167 | 167 | return $this; |