Code Duplication    Length = 16-16 lines in 2 locations

src/Memcache.php 1 location

@@ 138-153 (lines=16) @@
135
        $_key = $this->mapKey($key);
136
        $items = array($_key);
137
138
        if ($this->options['tag_enable']) {
139
            $idx_key = $this->mapIdx($key);
140
141
            // load the tags from the index key
142
            $tags = $this->getIndex($idx_key)->load();
143
144
            if (is_array($tags)) {
145
                // mark the key as deleted in the tags.
146
                foreach ($tags as $tag) {
147
                    $this->getIndex($this->mapTag($tag))->remove($_key);
148
                }
149
150
                // delete that index key
151
                $items[] = $idx_key;
152
            }
153
        }
154
155
        $success = true;
156

src/Memcached.php 1 location

@@ 160-175 (lines=16) @@
157
        $_key = $this->mapKey($key);
158
        $items = array( $_key );
159
160
        if ($this->options['tag_enable']) {
161
            $idx_key = $this->mapIdx($key);
162
163
            // load the tags from the index key
164
            $tags = $this->getIndex($idx_key)->load();
165
166
            if (is_array($tags)) {
167
                // mark the key as deleted in the tags.
168
                foreach ($tags as $tag) {
169
                    $this->getIndex($this->mapTag($tag))->remove($_key);
170
                }
171
172
                // delete that index key
173
                $items[] = $idx_key;
174
            }
175
        }
176
177
        if (is_callable(array($this->adapter, 'deleteMulti'))) { // this is false on HHVM
178
            $this->adapter->deleteMulti($items);