Plugin   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 43
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A pluginDetails() 0 9 1
A register() 0 6 1
1
<?php
2
3
namespace Autumn\JWTAuth;
4
5
use System\Classes\PluginBase;
6
7
/**
8
 * JWTAuth Plugin Information File.
9
 */
10
class Plugin extends PluginBase
11
{
12
    /**
13
     * Determine if this plugin should have elevated privileges.
14
     *
15
     * @var bool
16
     */
17
    public $elevated = true;
18
19
    /**
20
     * Plugin dependencies.
21
     *
22
     * @var array
23
     */
24
    public $require = ['RainLab.User'];
25
26
    /**
27
     * Returns information about this plugin.
28
     *
29
     * @return array
30
     */
31
    public function pluginDetails()
32
    {
33
        return [
34
            'name' => 'JWTAuth',
35
            'description' => 'JSON Web Token Authentication.',
36
            'author' => 'Autumn',
37
            'icon' => 'icon-user-secret',
38
        ];
39
    }
40
41
    /**
42
     * Register method, called when the plugin is first registered.
43
     *
44
     * @return void
45
     */
46
    public function register()
47
    {
48
        $this->app->register(\Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class);
49
50
        $this->app->register(ServiceProvider::class);
51
    }
52
}
53