Code Duplication    Length = 11-11 lines in 6 locations

src/Comodojo/Cache/Drivers/FilesystemXattr.php 2 locations

@@ 145-155 (lines=11) @@
142
    /**
143
     * {@inheritdoc}
144
     */
145
    public function getMultiple(array $keys, $namespace) {
146
147
        $result = [];
148
149
        foreach ( $keys as $key ) {
150
            $result[$key] = $this->get($key, $namespace);
151
        }
152
153
        return $result;
154
155
    }
156
157
    /**
158
     * {@inheritdoc}
@@ 175-185 (lines=11) @@
172
    /**
173
     * {@inheritdoc}
174
     */
175
    public function deleteMultiple(array $keys, $namespace) {
176
177
        $result = [];
178
179
        foreach ( $keys as $key ) {
180
            $result[] = $this->delete($key, $namespace);
181
        }
182
183
        return !in_array(false, $result);
184
185
    }
186
187
    /**
188
     * {@inheritdoc}

src/Comodojo/Cache/Drivers/Memory.php 2 locations

@@ 114-124 (lines=11) @@
111
    /**
112
     * {@inheritdoc}
113
     */
114
    public function getMultiple(array $keys, $namespace) {
115
116
        $result = [];
117
118
        foreach ( $keys as $key ) {
119
            $result[$key] = $this->get($key, $namespace);
120
        }
121
122
        return $result;
123
124
    }
125
126
    /**
127
     * {@inheritdoc}
@@ 144-154 (lines=11) @@
141
    /**
142
     * {@inheritdoc}
143
     */
144
    public function deleteMultiple(array $keys, $namespace) {
145
146
        $result = [];
147
148
        foreach ( $keys as $key ) {
149
            $result[] = $this->delete($key, $namespace);
150
        }
151
152
        return !in_array(false, $result);
153
154
    }
155
156
    /**
157
     * {@inheritdoc}

src/Comodojo/Cache/Drivers/PhpRedis.php 2 locations

@@ 202-212 (lines=11) @@
199
    /**
200
     * {@inheritdoc}
201
     */
202
    public function getMultiple(array $keys, $namespace) {
203
204
        $result = [];
205
206
        foreach ( $keys as $key ) {
207
            $result[$key] = $this->get($key, $namespace);
208
        }
209
210
        return $result;
211
212
    }
213
214
    // TODO: write a better setMultiple using mSet
215
    /**
@@ 234-244 (lines=11) @@
231
    /**
232
     * {@inheritdoc}
233
     */
234
    public function deleteMultiple(array $keys, $namespace) {
235
236
        $result = [];
237
238
        foreach ( $keys as $key ) {
239
            $result[] = $this->delete($key, $namespace);
240
        }
241
242
        return !in_array(false, $result);
243
244
    }
245
246
    /**
247
     * {@inheritdoc}