DiffbotAware   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A registerDiffbot() 0 6 1
1
<?php
2
3
namespace Swader\Diffbot\Traits;
4
5
use Swader\Diffbot\Diffbot;
6
7
/**
8
 * Class DiffbotAware
9
 * @property Diffbot diffbot
10
 * @package Swader\Diffbot\Traits
11
 */
12
trait DiffbotAware
13
{
14
    /**
15
     * Sets the Diffbot instance on the child class
16
     * Used to later fetch the token, HTTP client, EntityFactory, etc
17
     * @param Diffbot $d
18
     * @return $this
19
     */
20 123
    public function registerDiffbot(Diffbot $d)
21
    {
22 123
        $this->diffbot = $d;
23
24 123
        return $this;
25
    }
26
}