Passed
Pull Request — master (#17)
by ARCANEDEV
05:21
created

Controller   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace Arcanesoft\Media\Http\Controllers;
4
5
use Arcanesoft\Foundation\Support\Http\Controller as BaseController;
6
use Arcanesoft\Media\MediaManager;
7
8
/**
9
 * Class     Controller
10
 *
11
 * @package  Arcanesoft\Media\Http\Controllers
12
 * @author   ARCANEDEV <[email protected]>
13
 */
14
abstract class Controller extends BaseController
15
{
16
    /* -----------------------------------------------------------------
17
    |  Properties
18
    | -----------------------------------------------------------------
19
    */
20
21
    /** @var  \Arcanesoft\Media\MediaManager */
22
    protected $manager;
23
24
    /**
25
     * The view namespace.
26
     *
27
     * @var string|null
28
     */
29
    protected $viewNamespace = 'media';
30
31
    /* -----------------------------------------------------------------
32
     |  Constructor
33
     | -----------------------------------------------------------------
34
     */
35
36
    public function __construct(MediaManager $manager)
37
    {
38
        parent::__construct();
39
40
        $this->manager = $manager;
41
42
        $this->addBreadcrumbRoute(__('Media'), 'admin::media.index');
0 ignored issues
show
Bug introduced by
It seems like __('Media') can also be of type array and array; however, parameter $title of Arcanesoft\Foundation\Su...r::addBreadcrumbRoute() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

42
        $this->addBreadcrumbRoute(/** @scrutinizer ignore-type */ __('Media'), 'admin::media.index');
Loading history...
43
    }
44
}
45