EventsController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 4
dl 0
loc 30
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A __invoke() 0 6 1
1
<?php
2
3
namespace Sausin\Signere\Http\Controllers\Admin;
4
5
use Sausin\Signere\Events;
6
use Sausin\Signere\Http\Controllers\Controller;
7
8
class EventsController extends Controller
9
{
10
    /** @var \Sausin\Signere\Events */
11
    protected $events;
12
13
    /**
14
     * Create a new controller instance.
15
     *
16
     * @param  \Sausin\Signere\Events $events
17
     */
18 1
    public function __construct(Events $events)
19
    {
20 1
        parent::__construct();
21
22 1
        $this->events = $events;
23 1
    }
24
25
    /**
26
     * Returns the EventsQueue encryptionKey
27
     * as a base64 encoded string.
28
     *
29
     * @return \Illuminate\Http\Response
30
     */
31 1
    public function __invoke()
32
    {
33 1
        return $this->events->getEncryptionKey()
34 1
                ->getBody()
35 1
                ->getContents();
36
    }
37
}
38