TextBlockController::destroy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Larafolio\Http\Controllers;
4
5
use Larafolio\Models\TextBlock;
6
7
class TextBlockController extends Controller
8
{
9
    /**
10
     * Remove a text block.
11
     *
12
     * @param Larafolio\Models\TextBlock $block Text block to remove.
13
     *
14
     * @return \Illuminate\Http\Response
15
     */
16
    public function destroy(TextBlock $block)
17
    {
18
        $deleted = $this->user->removeTextBlock($block);
19
20
        return response()->json($deleted);
21
    }
22
}
23