Code Duplication    Length = 11-11 lines in 2 locations

Adapter/SQS/Consumer.php 1 location

@@ 67-77 (lines=11) @@
64
     *
65
     * @todo test if using $handlerList->removeByInstance we can disable debug as well
66
     */
67
    public function setDebug($debug)
68
    {
69
        if ($debug == $this->debug) {
70
            return $this;
71
        }
72
        if ($debug) {
73
            $handlerList = $this->client->getHandlerList();
74
            $handlerList->interpose(new TraceMiddleware($debug === true ? [] : $debug));
75
        }
76
77
        return $this;
78
    }
79
80
    /**

Adapter/SQS/Producer.php 1 location

@@ 39-49 (lines=11) @@
36
     *
37
     * @todo test if using $handlerList->removeByInstance we can disable debug as well
38
     */
39
    public function setDebug($debug) {
40
        if ($debug == $this->debug) {
41
            return $this;
42
        }
43
        if ($debug) {
44
            $handlerList = $this->client->getHandlerList();
45
            $handlerList->interpose(new TraceMiddleware($debug === true ? [] : $debug));
46
        }
47
48
        return $this;
49
    }
50
51
    /**
52
     * @param string $queueName NB: complete queue name as used by SQS