Completed
Push — dev ( cb64be...f9231c )
by Marc
02:52
created

AbstractExtension::getRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Mascame\Artificer\Extension;
2
3
use App;
4
use Mascame\Artificer\Options\PluginOption;
5
use Mascame\Extender\Manager;
6
7
abstract class AbstractExtension
8
{
9
10
    /**
11
     * Namespace will automatically be set if empty
12
     *
13
     * @var string
14
     */
15
    public $namespace;
16
17
    /**
18
     * @var string
19
     */
20
    public $version = '1.0';
21
22
    /**
23
     * Name that will be shown on extensions page
24
     *
25
     * @var string
26
     */
27
    public $name = null;
28
29
    /**
30
     * @var string
31
     */
32
    public $description = 'No description provided';
33
34
    /**
35
     * @var string
36
     */
37
    public $author = 'Anonymous';
38
39
    /**
40
     * @var string
41
     */
42
    public $configFile = null;
43
44
    /**
45
     * @var string
46
     */
47
    public $thumbnail = null;
48
49
    /**
50
     * @var string
51
     */
52
    public $slug;
53
54
    /**
55
     * @var PluginOption
56
     */
57
    protected $option;
58
59
    abstract public function boot();
60
61
    public function getSlug() {
62
        return $this->slug;
63
    }
64
    
65
    /**
66
     * @return Manager
67
     */
68
    abstract function getManager();
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
69
70
    /**
71
     * @param array $routes
0 ignored issues
show
Bug introduced by
There is no parameter named $routes. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
72
     */
73
    public final function isInstalled()
74
    {
75
        return $this->getManager()->isInstalled($this->namespace);
76
    }
77
78
}