Code Duplication    Length = 3-3 lines in 2 locations

FileInputStream.php 1 location

@@ 54-56 (lines=3) @@
51
            return;
52
        }
53
54
        if (get_resource_type($this->stream) !== 'Unknown' && fclose($this->stream) === false) {
55
            throw new IOException("Cannot close input stream.");
56
        }
57
58
        $this->stream = null;
59
    }

FileOutputStream.php 1 location

@@ 97-99 (lines=3) @@
94
        // PHP5.3.2以降はfcloseではロック解放されなくなり、明示的に開放する必要がある
95
        flock($this->stream, LOCK_UN);
96
97
        if (get_resource_type($this->stream) !== 'Unknown' && fclose($this->stream) === false) {
98
            throw new IOException("Cannot close output stream.");
99
        }
100
101
        $this->stream = null;
102
    }