Code Duplication    Length = 9-12 lines in 3 locations

src/Http/Controllers/UserController.php 3 locations

@@ 120-128 (lines=9) @@
117
     * @param  \Illuminate\Http\Request  $request
118
     * @return \Illuminate\Http\Response
119
     */
120
    public function show($id)
121
    {
122
        $user = $this->user->findOrFail($id);
123
124
        $response['user'] = $user;
125
        $response['status'] = true;
126
127
        return response()->json($response);
128
    }
129
130
    /**
131
     * Show the form for editing the specified resource.
@@ 136-144 (lines=9) @@
133
     * @param  \App\User  $user
134
     * @return \Illuminate\Http\Response
135
     */
136
    public function edit($id)
137
    {
138
        $user = $this->user->findOrFail($id);
139
140
        $response['user'] = $user;
141
        $response['status'] = true;
142
143
        return response()->json($response);
144
    }
145
146
    /**
147
     * Update the specified resource in storage.
@@ 238-249 (lines=12) @@
235
     * @param  \App\User  $user
236
     * @return \Illuminate\Http\Response
237
     */
238
    public function destroy($id)
239
    {
240
        $user = $this->user->findOrFail($id);
241
242
        if ($user->delete()) {
243
            $response['status'] = true;
244
        } else {
245
            $response['status'] = false;
246
        }
247
248
        return json_encode($response);
249
    }
250
}
251