Completed
Pull Request — master (#5)
by Jean-Baptiste
04:36
created

Guzzle5Mock   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace CanalTP\AbstractGuzzle\Tests\Mock;
4
5
use CanalTP\AbstractGuzzle\GuzzleFactory;
6
use GuzzleHttp\Subscriber\Mock;
7
8
class Guzzle5Mock extends \PHPUnit_Framework_TestCase
9
{
10
11
    /**
12
     * Guzzle5Mock constructor.
13
     */
14
    public function __construct(array $responseCollection)
15
    {
16
        $client = GuzzleFactory::createGuzzle('');
0 ignored issues
show
Bug introduced by
The call to createGuzzle() misses a required argument $options.

This check looks for function calls that miss required arguments.

Loading history...
17
        $mock = new Mock($responseCollection);
18
        $client->getEmitter()->attach($mock);
19
20
        return $client;
0 ignored issues
show
Bug introduced by
Constructors do not have meaningful return values, anything that is returned from here is discarded. Are you sure this is correct?
Loading history...
21
    }
22
}
23