Code Duplication    Length = 8-8 lines in 2 locations

src/Adapter/NullAdapter.php 1 location

@@ 45-52 (lines=8) @@
42
     *
43
     * @return mixed fallback result
44
     */
45
    protected function stream($path, $resource, Config $config, $fallback)
46
    {
47
        Util::rewindStream($resource);
48
        $contents = stream_get_contents($resource);
49
        $fallbackCall = array($this, $fallback);
50
51
        return call_user_func($fallbackCall, $path, $contents, $config);
52
    }
53
54
    /**
55
     * Write using a stream.

src/Adapter/Polyfill/StreamedWritingTrait.php 1 location

@@ 20-27 (lines=8) @@
17
     *
18
     * @return mixed fallback result
19
     */
20
    protected function stream($path, $resource, Config $config, $fallback)
21
    {
22
        Util::rewindStream($resource);
23
        $contents = stream_get_contents($resource);
24
        $fallbackCall = [$this, $fallback];
25
26
        return call_user_func($fallbackCall, $path, $contents, $config);
27
    }
28
29
    /**
30
     * Write using a stream.