Code Duplication    Length = 9-9 lines in 2 locations

src/NilPortugues/Laravel5/JsonApi/Controller/JsonApiController.php 2 locations

@@ 155-163 (lines=9) @@
152
     * @return callable
153
     * @codeCoverageIgnore
154
     */
155
    protected function findResourceCallable(Request $request)
156
    {
157
        return function () use ($request) {
158
            $idKey = $this->getDataModel()->getKeyName();
159
            $model = $this->getDataModel()->query()->where($idKey, $request->id)->first();
160
161
            return $model;
162
        };
163
    }
164
165
    /**
166
     * @param Request $request
@@ 297-305 (lines=9) @@
294
     * @return callable
295
     * @codeCoverageIgnore
296
     */
297
    protected function deleteResourceCallable(Request $request)
298
    {
299
        return function () use ($request) {
300
            $idKey = $this->getDataModel()->getKeyName();
301
            $model = $this->getDataModel()->query()->where($idKey, $request->id)->first();
302
303
            return $model->delete();
304
        };
305
    }
306
}
307