Code Duplication    Length = 8-8 lines in 2 locations

tests/Integration/API/AbstractAPITest.php 1 location

@@ 28-35 (lines=8) @@
25
            'api_key' => $_SERVER['API_KEY'],
26
        ));
27
        global $argv;
28
        if (in_array('--debug', $argv, true)) {
29
            $echoCb = function (Event $event) {
30
                echo (string) $event['request'].PHP_EOL;
31
                echo (string) $event['response'].PHP_EOL;
32
            };
33
            $this->xsollaClient->getEventDispatcher()->addListener('request.complete', $echoCb);
34
            $this->xsollaClient->getEventDispatcher()->addListener('request.exception', $echoCb);
35
        }
36
    }
37
}
38

tests/Integration/Webhook/ServerTest.php 1 location

@@ 44-51 (lines=8) @@
41
    {
42
        $this->guzzleClient = new Client('http://[::1]:8999');
43
        global $argv;
44
        if (in_array('--debug', $argv, true)) {
45
            $echoCb = function (Event $event) {
46
                echo (string) $event['request'].PHP_EOL;
47
                echo (string) $event['response'].PHP_EOL;
48
            };
49
            $this->guzzleClient->getEventDispatcher()->addListener('request.complete', $echoCb);
50
            $this->guzzleClient->getEventDispatcher()->addListener('request.exception', $echoCb);
51
        }
52
    }
53
54
    /**