Provider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 15
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A findOwn() 0 7 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: dsmrt
5
 * Date: 1/12/18
6
 * Time: 10:44 PM
7
 */
8
9
namespace flipbox\saml\sp\services;
10
11
use flipbox\saml\core\EnsureSAMLPlugin;
12
use flipbox\saml\core\services\AbstractProviderService;
13
use flipbox\saml\sp\Saml;
14
use flipbox\saml\sp\traits\SamlPluginEnsured;
15
16
/**
17
 * Class Provider
18
 *
19
 * @package flipbox\saml\sp\services
20
 */
21
class Provider extends AbstractProviderService
22
{
23
    use SamlPluginEnsured;
24
25
    /**
26
     * @inheritdoc
27
     */
28 3
    public function findOwn()
29
    {
30 3
        return $this->findByEntityId(Saml::getInstance()->getSettings()->getEntityId())->andWhere([
31
            /** By Definition this needs to be a provider that is enabled. */
32 3
            'enabled' => 1,
33 3
        ])->one();
34
    }
35
}
36