DocumentProviderCertificateController::__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\DocumentProvider;
6
use Sausin\Signere\Http\Controllers\Controller;
7
8
class DocumentProviderCertificateController extends Controller
9
{
10
    /** @var \Sausin\Signere\DocumentProvider */
11
    protected $dp;
12
13
    /**
14
     * Create a new controller instance.
15
     *
16
     * @param  \Sausin\Signere\DocumentProvider $dp
17
     */
18 1
    public function __construct(DocumentProvider $dp)
19
    {
20 1
        parent::__construct();
21
22 1
        $this->dp = $dp;
23 1
    }
24
25
    /**
26
     * Gets the expires date for your BankID certificate.
27
     *
28
     * @return \Illuminate\Http\Response
29
     */
30 1
    public function __invoke()
31
    {
32 1
        return $this->dp->getCertExpiry()
33 1
                ->getBody()
34 1
                ->getContents();
35
    }
36
}
37