TwitterPostAdapter   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 19
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A post() 0 4 1
A message() 0 4 1
1
<?php
2
3
namespace Structural\Adapter;
4
5
use Structural\Adapter\TwitterClient;
6
7
class TwitterPostAdapter implements Post
8
{
9
    private $client;
10
11
    public function __construct(TwitterClient $client)
12
    {
13
        $this->client = $client;
14
    }
15
16
    public function post($message)
17
    {
18
        $this->client->writeTweet($message);
19
    }
20
21
    public function message($message, $user)
22
    {
23
        $this->client->directMessage($message, $user);
24
    }
25
}
26