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();
}
}
'text' => 'my annotation',
'quote' => 'my quote',
'ranges' => [
- ['start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31]
+ ['start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31],
],
]);
$this->client->request('POST', $prefixUrl.'/'.$entry->getId().'.json', [], [], $headers, $content);
'text' => 'my annotation',
'quote' => $longQuote,
'ranges' => [
- ['start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31]
+ ['start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31],
],
]);
$this->client->request('POST', $prefixUrl.'/'.$entry->getId().'.json', [], [], $headers, $content);
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
-use Wallabag\CoreBundle\Command\CleanDuplicatesCommand;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Command\ShowUserCommand;
-use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\UserBundle\Entity\User;
class ShowUserCommandTest extends WallabagCoreTestCase