Skip to content

Commit

Permalink
MDL-58280 fileconverter_googledrive: Fix cibot complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese committed Apr 20, 2017
1 parent 9fe3363 commit 32f01c5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions files/converter/googledrive/classes/converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
*/
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',
Expand All @@ -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',
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* 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
*/
Expand Down
4 changes: 2 additions & 2 deletions files/converter/googledrive/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Test that unoconv is configured correctly
* Test that googledrive is configured correctly
*
* @package fileconverter_unoconv
* @package fileconverter_googledrive
* @copyright 2017 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/filelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3607,7 +3607,7 @@ public function put($url, $params = array(), $options = array()) {
$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;
Expand All @@ -3617,7 +3617,7 @@ public function put($url, $params = array(), $options = array()) {
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';
Expand Down

0 comments on commit 32f01c5

Please sign in to comment.