Completed
Pull Request — master (#32)
by Sergey
08:58 queued 05:34
created

PinterestBot   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 1
A __construct() 0 3 1
A __clone() 0 3 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Factories;
4
5
use seregazhuk\PinterestBot\Bot;
6
use seregazhuk\PinterestBot\Api\Request;
7
use seregazhuk\PinterestBot\Api\Response;
8
use seregazhuk\PinterestBot\Api\CurlAdapter;
9
use seregazhuk\PinterestBot\Api\ProvidersContainer;
10
11
class PinterestBot
12
{
13
    public static function create()
14
    {
15
        $request = new Request(new CurlAdapter());
16
        $response = new Response();
17
        $providersContainer = new ProvidersContainer($request, $response);
18
19
        return new Bot($providersContainer);
20
    }
21
22
    private function __construct()
23
    {
24
    }
25
26
    private function __clone()
27
    {
28
    }
29
}