aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/UserBundle/Entity/User.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php
index 5c75846f..aba76ca7 100644
--- a/src/Wallabag/UserBundle/Entity/User.php
+++ b/src/Wallabag/UserBundle/Entity/User.php
@@ -110,6 +110,8 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
110 private $trusted; 110 private $trusted;
111 111
112 /** 112 /**
113 * @var ArrayCollection
114 *
113 * @ORM\OneToMany(targetEntity="Wallabag\ApiBundle\Entity\Client", mappedBy="user", cascade={"remove"}) 115 * @ORM\OneToMany(targetEntity="Wallabag\ApiBundle\Entity\Client", mappedBy="user", cascade={"remove"})
114 */ 116 */
115 protected $clients; 117 protected $clients;
@@ -306,10 +308,8 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
306 */ 308 */
307 public function getFirstClient() 309 public function getFirstClient()
308 { 310 {
309 if (empty($this->clients)) { 311 if (!empty($this->clients)) {
310 return $this->clients; 312 return $this->clients->first();
311 } 313 }
312
313 return $this->clients->first();
314 } 314 }
315} 315}