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

Guzzle5Mock::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 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