private $trusted;
/**
+ * @var ArrayCollection
+ *
* @ORM\OneToMany(targetEntity="Wallabag\ApiBundle\Entity\Client", mappedBy="user", cascade={"remove"})
*/
protected $clients;
*/
public function getFirstClient()
{
- if (empty($this->clients)) {
- return $this->clients;
+ if (!empty($this->clients)) {
+ return $this->clients->first();
}
-
- return $this->clients->first();
}
}