@@ -4,9 +4,9 @@ |
||
| 4 | 4 | class ActiveUsersFilterIterator extends \FilterIterator |
| 5 | 5 | { |
| 6 | 6 | |
| 7 | - public function __construct( \Traversable $users ) |
|
| 7 | + public function __construct(\Traversable $users) |
|
| 8 | 8 | { |
| 9 | - parent::__construct( new \IteratorIterator( $users )); |
|
| 9 | + parent::__construct(new \IteratorIterator($users)); |
|
| 10 | 10 | } |
| 11 | 11 | public function accept() |
| 12 | 12 | { |
@@ -21,12 +21,12 @@ |
||
| 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 | - parent::__construct( $pdo, $user, $table ); |
|
| 26 | + parent::__construct($pdo, $user, $table); |
|
| 27 | 27 | |
| 28 | - $active = new ActiveUsersFilterIterator( $this ); |
|
| 29 | - $this->users = iterator_to_array( $active ); |
|
| 28 | + $active = new ActiveUsersFilterIterator($this); |
|
| 29 | + $this->users = iterator_to_array($active); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function getCreationDateTime() |
| 44 | 44 | { |
| 45 | 45 | if ($this->created) |
| 46 | - return \DateTime::createFromFormat( "Y-m-d H:i:s", $this->created ); |
|
| 46 | + return \DateTime::createFromFormat("Y-m-d H:i:s", $this->created); |
|
| 47 | 47 | return $this->created; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | public function getLastUpdateDateTime() |
| 55 | 55 | { |
| 56 | 56 | if ($this->updated) |
| 57 | - return \DateTime::createFromFormat( "Y-m-d H:i:s", $this->updated ); |
|
| 57 | + return \DateTime::createFromFormat("Y-m-d H:i:s", $this->updated); |
|
| 58 | 58 | return $this->updated; |
| 59 | 59 | |
| 60 | 60 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * @param mixed $email |
| 163 | 163 | * @return self |
| 164 | 164 | */ |
| 165 | - public function setEmail( $email) |
|
| 165 | + public function setEmail($email) |
|
| 166 | 166 | { |
| 167 | 167 | $this->email = $email; |
| 168 | 168 | return $this; |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * @return self |
| 199 | 199 | * @uses $api_key |
| 200 | 200 | */ |
| 201 | - public function setApiKey( $key ) |
|
| 201 | + public function setApiKey($key) |
|
| 202 | 202 | { |
| 203 | 203 | $this->api_key = $key; |
| 204 | 204 | return $this; |
@@ -42,8 +42,9 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function getCreationDateTime() |
| 44 | 44 | { |
| 45 | - if ($this->created) |
|
| 46 | - return \DateTime::createFromFormat( "Y-m-d H:i:s", $this->created ); |
|
| 45 | + if ($this->created) { |
|
| 46 | + return \DateTime::createFromFormat( "Y-m-d H:i:s", $this->created ); |
|
| 47 | + } |
|
| 47 | 48 | return $this->created; |
| 48 | 49 | } |
| 49 | 50 | |
@@ -53,8 +54,9 @@ discard block |
||
| 53 | 54 | */ |
| 54 | 55 | public function getLastUpdateDateTime() |
| 55 | 56 | { |
| 56 | - if ($this->updated) |
|
| 57 | - return \DateTime::createFromFormat( "Y-m-d H:i:s", $this->updated ); |
|
| 57 | + if ($this->updated) { |
|
| 58 | + return \DateTime::createFromFormat( "Y-m-d H:i:s", $this->updated ); |
|
| 59 | + } |
|
| 58 | 60 | return $this->updated; |
| 59 | 61 | |
| 60 | 62 | } |
@@ -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 | |
@@ -42,9 +42,9 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | FROM {$this->table}"; |
| 44 | 44 | |
| 45 | - $stmt = $pdo->prepare( $sql ); |
|
| 45 | + $stmt = $pdo->prepare($sql); |
|
| 46 | 46 | |
| 47 | - $stmt->setFetchMode( \PDO::FETCH_CLASS, $user ? get_class($user) : User::class ); |
|
| 47 | + $stmt->setFetchMode(\PDO::FETCH_CLASS, $user ? get_class($user) : User::class); |
|
| 48 | 48 | |
| 49 | 49 | if (!$stmt->execute()): |
| 50 | 50 | throw new \RuntimeException("Could not retrieve Users from database"); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function getLastUpdateDateTime(); |
| 25 | 25 | |
| 26 | 26 | |
| 27 | - public function setDisplayName( $name ); |
|
| 27 | + public function setDisplayName($name); |
|
| 28 | 28 | public function getDisplayName(); |
| 29 | 29 | |
| 30 | 30 | public function setFirstName($name); |
@@ -36,11 +36,11 @@ discard block |
||
| 36 | 36 | public function setLoginName($name); |
| 37 | 37 | public function getLoginName(); |
| 38 | 38 | |
| 39 | - public function setEmail( $email); |
|
| 39 | + public function setEmail($email); |
|
| 40 | 40 | public function getEmail(); |
| 41 | 41 | |
| 42 | 42 | public function getApiKey(); |
| 43 | - public function setApiKey( $key ); |
|
| 43 | + public function setApiKey($key); |
|
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | } |