ClassPassController::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 3
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
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 ClassPassController extends Controller
9
{
10
    public function index()
11
    {
12
        $classPasses = Bookwhen::classPasses();
13
14
        return view('bookwhen::class-passes.index', compact('classPasses'));
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::class-passes.index', compact('classPasses'));
Loading history...
15
    }
16
17
    public function show(string $classPassId)
18
    {
19
        $classPass = Bookwhen::classPass($classPassId);
20
21
        return view('bookwhen::class-passes.show', compact('classPass'));
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::class-passes.show', compact('classPass'));
Loading history...
22
    }
23
}
24