AttachmentController::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
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 AttachmentController extends Controller
9
{
10
    public function index()
11
    {
12
        $attachments = Bookwhen::attachments();
13
14
        return view('bookwhen::attachments.index', compact('attachments'));
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::attachments.index', compact('attachments'));
Loading history...
15
    }
16
17
    public function show(string $attachmentId)
18
    {
19
        $attachment = Bookwhen::attachment($attachmentId);
20
21
        return view('bookwhen::attachments.show', compact('attachment'));
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::attachments.show', compact('attachment'));
Loading history...
22
    }
23
}
24