Completed
Push — master ( e1326f...7c8e33 )
by Abdelrahman
02:34 queued 01:22
created

PagesController::__invoke()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 2
eloc 3
nc 1
nop 1
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();
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 144 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
15
16
        return view($page->view, compact('page'));
17
    }
18
}
19