public function close(): void
    {
        // If there is no stream
        if (null === $this->stream) {
            // Don't do anything
            return;
        }

        // Detach the stream
        $resource = $this->detach();

        // Close the stream
        fclose($resource);
    }
public function close(): void
    {
        // If there is no stream
        if (null === $this->stream) {
            // Don't do anything
            return;
        }

        // Detach the stream
        $resource = $this->detach();

        // Close the stream
        fclose($resource);
    }
public function close ( ) : void { // If there is no stream if ( null === $ this -> stream ) { // Don't do anything return ; } // Detach the stream $ resource = $ this -> detach ( ) ; // Close the stream fclose ( $ resource ) ; }
Closes the stream and any underlying resources.

@return void
Closes the stream and any underlying resources .