Code Duplication    Length = 14-14 lines in 2 locations

src/Reader/ApiCfpReader.php 1 location

@@ 44-57 (lines=14) @@
41
42
    protected $client;
43
44
    public function __construct($baseUri, $bearerToken, $client = null)
45
    {
46
        $this->baseUri = str_Replace('/cfp', '', $baseUri);
47
48
        $this->bearerToken = $bearerToken;
49
        if (null === $client) {
50
            $client = new Client([
51
                'headers' => [
52
                    'Accept' => 'application/json',
53
                ]
54
            ]);
55
        }
56
        $this->client = $client;
57
    }
58
59
    /**
60
     * @param \DateInterval      $interval

src/Writer/ApiCfpWriter.php 1 location

@@ 47-60 (lines=14) @@
44
45
    protected $output;
46
47
    public function __construct($baseUri, $bearerToken, $client = null)
48
    {
49
        $this->baseUri     = $baseUri;
50
        $this->bearerToken = $bearerToken;
51
        if (null === $client) {
52
            $client = new Client([
53
                'headers' => [
54
                    'Accept' => 'application/json',
55
                ]
56
            ]);
57
        }
58
        $this->client = $client;
59
        $this->output = new NullOutput();
60
    }
61
62
    public function write(Cfp $cfp, $source)
63
    {