WebTinkerController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 4 1
A execute() 0 8 1
1
<?php
2
3
namespace Spatie\WebTinker\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
use Spatie\WebTinker\Tinker;
7
8
class WebTinkerController
9
{
10
    public function index()
11
    {
12
        return view('web-tinker::web-tinker', ['path' => config('web-tinker.path')]);
13
    }
14
15
    public function execute(Request $request, Tinker $tinker)
16
    {
17
        $validated = $request->validate([
18
            'code' => 'required',
19
        ]);
20
21
        return $tinker->execute($validated['code']);
22
    }
23
}
24