Completed
Branch master (afd3db)
by Yaro
01:50
created

ShowHideColumnsTool::identifier()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Yaro\Jarboe\Table\Toolbar;
4
5
use Illuminate\Http\Request;
6
7
class ShowHideColumnsTool extends AbstractTool
8
{
9
    /**
10
     * Position where should tool be placed.
11
     */
12 1
    public function position()
13
    {
14 1
        return self::POSITION_HEADER;
15
    }
16
17
    /**
18
     * Unique tool identifier.
19
     */
20 4
    public function identifier(): string
21
    {
22 4
        return 'show_hide_columns';
23
    }
24
25
    /**
26
     * Tool's view.
27
     */
28 1
    public function render()
29
    {
30 1
        return view('jarboe::crud.toolbar.show_hide_columns', [
31 1
            'tool' => $this,
32
        ]);
33
    }
34
35
    /**
36
     * Handle tool execution.
37
     * @param Request $request
38
     */
39 1
    public function handle(Request $request)
40
    {
41
        // dummy
42 1
    }
43
44
    /**
45
     * Check allowance to show and process tool.
46
     */
47 1
    public function check(): bool
48
    {
49 1
        return true;
50
    }
51
}
52