Code Duplication    Length = 11-13 lines in 3 locations

core/services/container/CoffeeShop.php 3 locations

@@ 224-234 (lines=11) @@
221
     * @param string   $identifier
222
     * @return boolean
223
     */
224
    public function removeClosure($identifier)
225
    {
226
        $identifier = $this->processIdentifier($identifier);
227
        if ($this->reservoir->has($identifier)) {
228
            $this->reservoir->remove($this->reservoir->get($identifier));
229
            if ( ! $this->reservoir->has($identifier)) {
230
                return true;
231
            }
232
        }
233
        return false;
234
    }
235
236
237
@@ 257-267 (lines=11) @@
254
     * @param string $identifier
255
     * @return boolean
256
     */
257
    public function removeService($identifier)
258
    {
259
        $identifier = $this->processIdentifier($identifier);
260
        if ($this->carafe->has($identifier)) {
261
            $this->carafe->remove($this->carafe->get($identifier));
262
            if ( ! $this->carafe->has($identifier)) {
263
                return true;
264
            }
265
        }
266
        return false;
267
    }
268
269
270
@@ 290-302 (lines=13) @@
287
     * @param string $identifier The Recipe's identifier
288
     * @return boolean
289
     */
290
    public function removeRecipe($identifier)
291
    {
292
        $identifier = $this->processIdentifier($identifier);
293
        if ($this->recipes->has($identifier)) {
294
            $this->recipes->remove(
295
                $this->recipes->get($identifier)
296
            );
297
            if ( ! $this->recipes->has($identifier)) {
298
                return true;
299
            }
300
        }
301
        return false;
302
    }
303
304
305