src/Model/Behavior/ProfferBehavior.php
protected function moveUploadedFile($file, $destination)
    {
        if (is_uploaded_file($file)) {
            return move_uploaded_file($file, $destination);
        }

        return rename($file, $destination);
    }
protected function moveUploadedFile($file, $destination)
    {
        if (is_uploaded_file($file)) {
            return move_uploaded_file($file, $destination);
        }

        return rename($file, $destination);
    }
protected function moveUploadedFile ( $ file , $ destination ) { if ( is_uploaded_file ( $ file ) ) { return move_uploaded_file ( $ file , $ destination ) ; } return rename ( $ file , $ destination ) ; }
Wrapper method for move_uploaded_file to facilitate testing and 'uploading' of local files

This will check if the file has been uploaded or not before picking the correct method to move the file

@param string $file Path to the uploaded file
@param string $destination The destination file name

@return bool
Wrapper method for move_uploaded_file to facilitate testing and uploading of local files