FileEditManagerController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 9 1
1
<?php
2
3
namespace Itstructure\MFU\Http\Controllers\Managers;
4
5
use Illuminate\Http\Request;
6
use Itstructure\MFU\Facades\Previewer;
7
use Itstructure\MFU\Http\Controllers\BaseController;
8
use Itstructure\MFU\Models\Mediafile;
9
10
/**
11
 * Class FileEditManagerController
12
 * @package Itstructure\MFU\Http\Controllers\Managers
13
 */
14
class FileEditManagerController extends BaseController
15
{
16
    /**
17
     * @param int $id
18
     * @param Request $request
19
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
20
     */
21
    public function index(int $id, Request $request)
22
    {
23
        $mediaFile = Mediafile::find($id);
24
        return view('uploader::managers.file-edit', [
25
            'preview' => Previewer::getPreviewHtml($mediaFile, \Itstructure\MFU\Services\Previewer::LOCATION_FILE_INFO),
0 ignored issues
show
Bug introduced by
The method getPreviewHtml() does not exist on Itstructure\MFU\Facades\Previewer. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

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

25
            'preview' => Previewer::/** @scrutinizer ignore-call */ getPreviewHtml($mediaFile, \Itstructure\MFU\Services\Previewer::LOCATION_FILE_INFO),
Loading history...
26
            'mediaFile' => $mediaFile,
27
            'manager' => 'file_edit',
28
            'referer' => url()->previous(),
29
            'fromFileSetter' => !empty($request->get('from_file_setter'))
30
        ]);
31
    }
32
}
33