From 65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 23 May 2015 23:25:18 -0400 Subject: Add functional tests for task links --- app/Model/Link.php | 4 ++-- app/Model/TaskLink.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/Model/Link.php b/app/Model/Link.php index b26a01e4..e0e5184e 100644 --- a/app/Model/Link.php +++ b/app/Model/Link.php @@ -125,7 +125,7 @@ class Link extends Base $label_id = $this->db->getConnection()->getLastId(); - if ($opposite_label !== '') { + if (! empty($opposite_label)) { $this->db ->table(self::TABLE) @@ -144,7 +144,7 @@ class Link extends Base $this->db->closeTransaction(); - return $label_id; + return (int) $label_id; } /** diff --git a/app/Model/TaskLink.php b/app/Model/TaskLink.php index 7b696afc..251460c9 100644 --- a/app/Model/TaskLink.php +++ b/app/Model/TaskLink.php @@ -144,7 +144,7 @@ class TaskLink extends Base $this->db->closeTransaction(); - return $task_link_id; + return (int) $task_link_id; } /** -- cgit v1.2.3