Browse Source

deleteById return deleted dbo

develop
Robin Thoni 8 years ago
parent
commit
79960ee73b
1 changed files with 4 additions and 6 deletions
  1. 4
    6
      src/Utils/Business/LuBusiness.php

+ 4
- 6
src/Utils/Business/LuBusiness.php View File

@@ -69,15 +69,13 @@ abstract class LuBusiness {
69 69
 
70 70
     /**
71 71
      * @param $id int
72
-     * @return int
72
+     * @return LuDbo
73 73
      */
74 74
     public static function deleteById($id)
75 75
     {
76
-        $res = static::getDataAccess()->deleteSingleById($id);
77
-        if (!$res) {
78
-            self::notFound(static::getResourceName() . " not found");
79
-        }
80
-        return $res;
76
+        $dbo = static::getById($id);
77
+        static::getDataAccess()->deleteSingleById($id);
78
+        return $dbo;
81 79
     }
82 80
 
83 81
     /**

Loading…
Cancel
Save