DocumentProviderCertificateController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 4
dl 0
loc 29
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\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