Code Duplication    Length = 13-14 lines in 2 locations

src/Filesystem.php 2 locations

@@ 200-213 (lines=14) @@
197
    /**
198
     * @inheritdoc
199
     */
200
    public function writeStream($path, $resource, array $config = array())
201
    {
202
        if ( ! is_resource($resource)) {
203
            throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
204
        }
205
206
        $path = Util::normalizePath($path);
207
        $this->assertAbsent($path);
208
        $config = $this->prepareConfig($config);
209
210
        Util::rewindStream($resource);
211
212
        return (bool) $this->getAdapter()->writeStream($path, $resource, $config);
213
    }
214
215
    /**
216
     * @inheritdoc
@@ 284-296 (lines=13) @@
281
    /**
282
     * @inheritdoc
283
     */
284
    public function updateStream($path, $resource, array $config = array())
285
    {
286
        if ( ! is_resource($resource)) {
287
            throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
288
        }
289
290
        $path = Util::normalizePath($path);
291
        $config = $this->prepareConfig($config);
292
        $this->assertPresent($path);
293
        Util::rewindStream($resource);
294
295
        return (bool) $this->getAdapter()->updateStream($path, $resource, $config);
296
    }
297
298
    /**
299
     * @inheritdoc