MDL-58220 oauth2: Cibot fixes

Missing phpdocs.
This commit is contained in:
Damyon Wiese 2017-03-15 15:07:41 +08:00
parent 738c4a2a73
commit 092304a3de
6 changed files with 15 additions and 7 deletions

View File

@ -134,6 +134,8 @@ class issuer extends persistent {
/**
* Perform matching against the list of allowed login domains for this issuer.
*
* @param string $email The email to check.
* @return boolean
*/
public function is_valid_login_domain($email) {

View File

@ -1058,6 +1058,7 @@ class repository_googledocs extends repository {
/**
* Callback to get the required scopes for system account.
*
* @param \core\oauth2\issuer $issuer
* @return string
*/
function repository_googledocs_oauth2_system_scopes(\core\oauth2\issuer $issuer) {

View File

@ -17,7 +17,7 @@
/**
* Class for loading/storing access records from the DB.
*
* @package core
* @package repository_skydrive
* @copyright 2017 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@ -30,6 +30,7 @@ use core\persistent;
/**
* Class for loading/storing issuer from the DB
*
* @package repository_skydrive
* @copyright 2017 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

View File

@ -30,7 +30,7 @@ defined('MOODLE_INTERNAL') || die();
/**
* Simple task to delete temporary permission records.
* @package core
* @package repository_skydrive
* @copyright 2017 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

View File

@ -18,6 +18,7 @@ defined('MOODLE_INTERNAL') || die();
/**
* @param int $oldversion the version we are upgrading from
* @package repository_skydrive
* @return bool result
*/
function xmldb_repository_skydrive_upgrade($oldversion) {

View File

@ -271,6 +271,7 @@ class repository_skydrive extends repository {
*
* @param string $q search query as expected by the Google API.
* @param string $path parent path of the current files, will not be used for the query.
* @param string $parent Parent id.
* @param int $page page.
* @return array of files and folders.
*/
@ -391,7 +392,7 @@ class repository_skydrive extends repository {
* Get a file.
*
* @param string $reference reference of the file.
* @param string $file name to save the file to.
* @param string $filename filename to save the file to.
* @return string JSON encoded array of information about the file.
*/
public function get_file($reference, $filename = '') {
@ -726,7 +727,7 @@ class repository_skydrive extends repository {
*
* @param \repository_skydrive\rest $client Authenticated client.
* @param string $fileid The file we are updating.
* @param string $userid The userid of the writer account to add.
* @param string $useremail The user email of the writer account to add.
* @return boolean
*/
protected function add_writer_to_file(\repository_skydrive\rest $client, $fileid, $useremail) {
@ -767,10 +768,12 @@ class repository_skydrive extends repository {
}
/**
* Get share info.
* Copy a shared file to a new folder.
*
* @param \repository_skydrive\rest $client Authenticated client.
* @param string $sharetoken The share we are querying.
* @param string $newdrive Id of the drive to copy to.
* @param string $parentid Id of the folder to copy to.
* @return stdClass
*/
protected function copy_share(\repository_skydrive\rest $client, $sharetoken, $newdrive, $parentid) {
@ -793,8 +796,8 @@ class repository_skydrive extends repository {
* Replace unsafe URL characters with an equivelent character; replace / with _ and + with -.
* Append u! to the beginning of the string.
*
* @param string sharingUrl
* @return string sharingtoken
* @param string $shareurl
* @return string The sharing token
*/
protected function get_share_token($shareurl) {
return 'u!' . str_replace(['/', '+'], ['_', '-'], rtrim(base64_encode($shareurl), '='));