Code Duplication    Length = 11-14 lines in 2 locations

src/Memcache.php 1 location

@@ 109-119 (lines=11) @@
106
    {
107
        $items = array();
108
109
        foreach ($tags as $tag) {
110
            $keys = $this->loadTag($tag);
111
            if (null !== $keys) {
112
                foreach ($keys as $key) {
113
                    $items[] = $key;
114
                }
115
            }
116
117
            // add the tag to deletion
118
            $items[] = $this->mapTag($tag);
119
        }
120
121
        $success = true;
122

src/Memcached.php 1 location

@@ 120-133 (lines=14) @@
117
    public function clean(array $tags)
118
    {
119
        $items = array();
120
        foreach ($tags as $tag) {
121
            $keys = $this->loadTag($tag);
122
            if (null !== $keys) {
123
                foreach ($keys as $key) {
124
                    $items[] = $key;
125
                    // $items[] = $this->mapIdx($key);
126
                }
127
            }
128
            // add the tag to deletion
129
            $items[] = $this->mapTag($tag);
130
131
            // add the index key for deletion
132
            // $items[] = $this->mapTag($tag);
133
        }
134
135
        if (is_callable(array($this->adapter, 'deleteMulti'))) { // this is false on HHVM
136
            $this->adapter->deleteMulti($items);