$entries = $this
->getDoctrine()
->getRepository('WallabagCoreBundle:Entry')
- ->findEntries(1, $isArchived, $isStarred, $isDeleted, $sort, $order);
+ ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $isDeleted, $sort, $order);
- if (!is_array($entries)) {
+ if (!($entries)) {
throw $this->createNotFoundException();
}
/**
* Find Entries
*
- * @param int $userId
- * @param bool $isArchived
- * @param bool $isStarred
- * @param bool $isDeleted
- * @param string $sort
- * @param string $order
+ * @param int $userId
+ * @param bool $isArchived
+ * @param bool $isStarred
+ * @param bool $isDeleted
+ * @param string $sort
+ * @param string $order
*
- * @return ArrayCollection
+ * @return array
*/
public function findEntries($userId, $isArchived = null, $isStarred = null, $isDeleted = null, $sort = 'created', $order = 'ASC')
{