diff --git a/files/converter/googledrive/classes/converter.php b/files/converter/googledrive/classes/converter.php index 13c3605f4b1..831c20f31d8 100644 --- a/files/converter/googledrive/classes/converter.php +++ b/files/converter/googledrive/classes/converter.php @@ -39,6 +39,7 @@ use \core_files\conversion; */ class converter implements \core_files\converter_interface { + /** @var array $imports List of supported import file formats */ private static $imports = [ 'doc' => 'application/vnd.google-apps.document', 'docx' => 'application/vnd.google-apps.document', @@ -49,6 +50,7 @@ class converter implements \core_files\converter_interface { 'pptx' => 'application/vnd.google-apps.presentation' ]; + /** @var array $export List of supported export file formats */ private static $exports = [ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'rtf' => 'application/rtf', @@ -61,8 +63,7 @@ class converter implements \core_files\converter_interface { /** * Convert a document to a new format and return a conversion object relating to the conversion in progress. * - * @param conversion $conversion The file to be converted - * @param string $format The target file format + * @param \core_files\conversion $conversion The file to be converted * @return this */ public function start_document_conversion(\core_files\conversion $conversion) { diff --git a/files/converter/googledrive/lang/en/fileconverter_googledrive.php b/files/converter/googledrive/lang/en/fileconverter_googledrive.php index b796bba4f02..f118f0ef711 100644 --- a/files/converter/googledrive/lang/en/fileconverter_googledrive.php +++ b/files/converter/googledrive/lang/en/fileconverter_googledrive.php @@ -15,9 +15,9 @@ // along with Moodle. If not, see . /** - * Strings for plugin 'fileconverter_example' + * Strings for plugin 'fileconverter_googledrive' * - * @package fileconverter_example + * @package fileconverter_googledrive * @copyright 2017 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/files/converter/googledrive/test.php b/files/converter/googledrive/test.php index 426d41ab422..fa764caad90 100644 --- a/files/converter/googledrive/test.php +++ b/files/converter/googledrive/test.php @@ -15,9 +15,9 @@ // along with Moodle. If not, see . /** - * Test that unoconv is configured correctly + * Test that googledrive is configured correctly * - * @package fileconverter_unoconv + * @package fileconverter_googledrive * @copyright 2017 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/lib/filelib.php b/lib/filelib.php index 34434a0a90b..b1dafb9e3a2 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -3607,7 +3607,7 @@ class curl { $fp = false; if (isset($params['file'])) { $file = $params['file']; - if(is_file($file)) { + if (is_file($file)) { $fp = fopen($file, 'r'); $size = filesize($file); $options['CURLOPT_PUT'] = 1; @@ -3617,7 +3617,7 @@ class curl { return null; } if (!isset($this->options['CURLOPT_USERPWD'])) { - $this->setopt(array('CURLOPT_USERPWD'=>'anonymous: noreply@moodle.org')); + $this->setopt(array('CURLOPT_USERPWD' => 'anonymous: noreply@moodle.org')); } } else { $options['CURLOPT_CUSTOMREQUEST'] = 'PUT';