EventController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 14
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A show() 0 5 1
A index() 0 5 1
1
<?php
2
3
namespace InShore\Bookwhen\Http\Controllers;
4
5
use App\Http\Controllers\Controller;
0 ignored issues
show
Bug introduced by
The type App\Http\Controllers\Controller was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use InShore\Bookwhen\Facades\Bookwhen;
7
8
class EventController extends Controller
9
{
10
    public function index()
11
    {
12
        $events = Bookwhen::events();
13
14
        return view('bookwhen::events.index', compact('events'));
0 ignored issues
show
Bug introduced by
The function view was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
        return /** @scrutinizer ignore-call */ view('bookwhen::events.index', compact('events'));
Loading history...
15
    }
16
17
    public function show(string $eventId)
18
    {
19
        $event = Bookwhen::event($eventId);
20
21
        return view('bookwhen::events.show', compact('event'));
0 ignored issues
show
Bug introduced by
The function view was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

21
        return /** @scrutinizer ignore-call */ view('bookwhen::events.show', compact('event'));
Loading history...
22
    }
23
}
24