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

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