Code Duplication    Length = 22-24 lines in 2 locations

src/Extensions/SmokeReporter/Reporter/KoalamonReporter.php 1 location

@@ 48-69 (lines=22) @@
45
    const STATUS_SUCCESS = 'success';
46
    const STATUS_FAILURE = 'failure';
47
48
    public function init($apiKey, Configuration $_configuration, OutputInterface $_output, $server = 'https://webhook.koalamon.com', $system = '', $identifier = '', $tool = '', $collect = true, $systemUseRetriever = false, $groupBy = false, $addComingFrom = true)
49
    {
50
        $httpClient = new \GuzzleHttp\Client();
51
        $this->reporter = new KoalaReporter('', $apiKey, $httpClient, $server);
52
53
        $this->config = $_configuration;
54
        $this->systemUseRetriever = $systemUseRetriever;
55
56
        $this->system = $system;
57
        $this->collect = $collect;
58
        $this->identifier = $identifier;
59
        $this->groupBy = $groupBy;
60
61
        $this->addComingFrom = $addComingFrom;
62
63
        if ($tool) {
64
            $this->tool = $tool;
65
        }
66
67
        $this->server = $server;
68
        $this->output = $_output;
69
    }
70
71
    public function setResponseRetriever(Retriever $retriever)
72
    {

src/Extensions/SmokeReporter/Reporter/LeankoalaReporter.php 1 location

@@ 54-77 (lines=24) @@
51
    const STATUS_SUCCESS = 'success';
52
    const STATUS_FAILURE = 'failure';
53
54
    public function init($apiKey, Configuration $_configuration, OutputInterface $_output, $server = 'https://webhook.koalamon.com', $system = '', $identifier = '', $tool = '', $collect = true, $systemUseRetriever = false, $groupBy = false, $addComingFrom = true)
55
    {
56
        $httpClient = new \GuzzleHttp\Client();
57
        $this->reporter = new KoalaReporter('', $apiKey, $httpClient, $server);
58
59
        $this->config = $_configuration;
60
        $this->systemUseRetriever = $systemUseRetriever;
61
62
        $this->system = $system;
63
        $this->collect = $collect;
64
        $this->identifier = $identifier;
65
        $this->groupBy = $groupBy;
66
67
        $this->addComingFrom = $addComingFrom;
68
69
        if ($tool) {
70
            $this->tool = $tool;
71
        }
72
73
        $this->leankoalaExtension = $_configuration->getExtension('Leankoala');
74
75
        $this->server = $server;
76
        $this->output = $_output;
77
    }
78
79
    public function setResponseRetriever(Retriever $retriever)
80
    {