EventsController::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
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