PagesController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rinvex\Pages\Http\Controllers;
6
7
use Illuminate\Http\Request;
8
use Illuminate\Routing\Controller;
9
10
class PagesController extends Controller
11
{
12
    public function __invoke(Request $request)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
13
    {
14
        $page = app('rinvex.pages.page')->where('uri', $request->route()->uri())->where('domain', $request->route()->domain() ?: null)->first();
15
16
        return view($page->view, compact('page'));
17
    }
18
}
19