Code Duplication    Length = 11-11 lines in 2 locations

Adapter/SQS/Producer.php 1 location

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

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
        if ($debug == $this->debug) {
69
            return $this;
70
        }
71
        if ($debug) {
72
            $handlerList = $this->client->getHandlerList();
73
            $handlerList->interpose(new TraceMiddleware($debug === true ? [] : $debug));
74
        }
75
76
        return $this;
77
    }
78
79
    /**
80
     * @param int $limit MB