src/Variant/VariantProcessor.php
protected function makeTemporaryCopy(StorableFileInterface $source)
    {
        $path = $this->makeLocalTemporaryPath($source->extension());

        try {
            $success = $source->copy($path);

            // @codeCoverageIgnoreStart
        } catch (Exception $e) {
            throw new CouldNotProcessDataException("Failed to make variant copy to '{$path}'", $e->getCode(), $e);
            // @codeCoverageIgnoreEnd
        }

        // @codeCoverageIgnoreStart
        if ( ! $success) {
            throw new CouldNotProcessDataException("Failed to make variant copy to '{$path}'");
        }
        // @codeCoverageIgnoreEnd

        $file = new ProcessableFile;

        $file->setName($source->name());
        $file->setMimeType($source->mimeType());
        $file->setData($path);

        return $file;
    }
protected function makeTemporaryCopy(StorableFileInterface $source)
    {
        $path = $this->makeLocalTemporaryPath($source->extension());

        try {
            $success = $source->copy($path);

            // @codeCoverageIgnoreStart
        } catch (Exception $e) {
            throw new CouldNotProcessDataException("Failed to make variant copy to '{$path}'", $e->getCode(), $e);
            // @codeCoverageIgnoreEnd
        }

        // @codeCoverageIgnoreStart
        if ( ! $success) {
            throw new CouldNotProcessDataException("Failed to make variant copy to '{$path}'");
        }
        // @codeCoverageIgnoreEnd

        $file = new ProcessableFile;

        $file->setName($source->name());
        $file->setMimeType($source->mimeType());
        $file->setData($path);

        return $file;
    }
protected function makeTemporaryCopy ( StorableFileInterface $ source ) { $ path = $ this -> makeLocalTemporaryPath ( $ source -> extension ( ) ) ; try { $ success = $ source -> copy ( $ path ) ; // @codeCoverageIgnoreStart } catch ( Exception $ e ) { throw new CouldNotProcessDataException ( "Failed to make variant copy to '{$path}'" , $ e -> getCode ( ) , $ e ) ; // @codeCoverageIgnoreEnd } // @codeCoverageIgnoreStart if ( ! $ success ) { throw new CouldNotProcessDataException ( "Failed to make variant copy to '{$path}'" ) ; } // @codeCoverageIgnoreEnd $ file = new ProcessableFile ; $ file -> setName ( $ source -> name ( ) ) ; $ file -> setMimeType ( $ source -> mimeType ( ) ) ; $ file -> setData ( $ path ) ; return $ file ; }
Makes a copy of the original file info that will be manipulated into the variant.

@param StorableFileInterface $source
@return ProcessableFileInterface
@throws CouldNotProcessDataException
Makes a copy of the original file info that will be manipulated into the variant .