Code Duplication    Length = 12-12 lines in 2 locations

src/TreeHouse/WorkerBundle/Queue.php 1 location

@@ 86-97 (lines=12) @@
83
     *
84
     * @return array
85
     */
86
    public function getActionStats($action)
87
    {
88
        try {
89
            return $this->pheanstalk->statsTube($action);
90
        } catch (Exception $exception) {
91
            if (false !== strpos($exception->getMessage(), 'NOT_FOUND')) {
92
                return null;
93
            }
94
95
            throw $exception;
96
        }
97
    }
98
99
    /**
100
     * Add a job to the queue.

src/TreeHouse/WorkerBundle/QueueManager.php 1 location

@@ 176-187 (lines=12) @@
173
     *
174
     * @return array
175
     */
176
    public function getActionStats($action)
177
    {
178
        try {
179
            return $this->pheanstalk->statsTube($action);
180
        } catch (Exception $exception) {
181
            if (false !== strpos($exception->getMessage(), 'NOT_FOUND')) {
182
                return null;
183
            }
184
185
            throw $exception;
186
        }
187
    }
188
189
    /**
190
     * Add a job to the queue.