Completed
Push — master ( 971f8c...178156 )
by Alex
57:06 queued 11s
created

GuzzleClientBuilder::getPackageName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/*
3
 * This file is part of the feed-io package.
4
 *
5
 * (c) Alexandre Debril <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace FeedIo\Factory\Builder;
12
13
use FeedIo\Factory\ClientBuilderInterface;
14
use \FeedIo\Adapter\Guzzle\Client;
15
use \GuzzleHttp\Client as GuzzleClient;
16
17
/**
18
 * @package FeedIo
19
 */
20
class GuzzleClientBuilder implements ClientBuilderInterface
21
{
22
23
    /**
24
     * This method MUST return a \FeedIo\Adapter\ClientInterface instance
25
     * @return \FeedIo\Adapter\ClientInterface
26
     */
27 2
    public function getClient()
28
    {
29 2
        return new Client(new GuzzleClient);
30
    }
31
 
32
    /**
33
     * This method MUST return the name of the main class
34
     * @return string
35
     */
36 1
    public function getMainClassName()
37
    {
38 1
        return '\GuzzleHttp\Client';
39
    }
40
    
41
    /**
42
     * This method MUST return the name of the package name
43
     * @return string
44
     */
45 1
    public function getPackageName()
46
    {
47 1
        return 'guzzlehttp/guzzle';
48
    }
49
    
50
}
51