Completed
Push — develop ( 00e57b...8b0e18 )
by Carsten
04:54
created
src/ActiveUsersFilterIterator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/PdoAllActiveUsers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/UserAbstract.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,8 +42,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/PdoAllUsers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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");
Please login to merge, or discard this patch.
src/UserInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.