aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-06-07 23:23:34 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-06-07 23:31:14 +0200
commiteb570e49c8e3ba12638fac600bb5527191c2aaa2 (patch)
tree305212af68db9c2b1882788c9218aa323b801b78 /src/Wallabag/UserBundle
parent0c00e5251671c3648eabb8888271c09137ad902d (diff)
downloadwallabag-eb570e49c8e3ba12638fac600bb5527191c2aaa2.tar.gz
wallabag-eb570e49c8e3ba12638fac600bb5527191c2aaa2.tar.zst
wallabag-eb570e49c8e3ba12638fac600bb5527191c2aaa2.zip
CS
Diffstat (limited to 'src/Wallabag/UserBundle')
-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}