Skip to content

Commit

Permalink
Poet - Fixing polyfill declarations for privacy API.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Churchward committed Dec 3, 2018
1 parent dbe2678 commit e88caa8
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 14 deletions.
4 changes: 3 additions & 1 deletion classes/privacy/provider.php
Expand Up @@ -29,12 +29,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion context/category/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion context/cohort/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion context/course/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion context/group/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion context/module/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
8 changes: 5 additions & 3 deletions context/user/classes/privacy/provider.php
Expand Up @@ -33,13 +33,15 @@ class provider implements
// This plugin currently implements the original plugin_provider interface.
\core_privacy\local\request\plugin\provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @param collection $items The collection to add metadata to.
* @return collection The array of metadata
*/
public static function get_metadata(\core_privacy\local\metadata\collection $collection): \core_privacy\local\metadata\collection {
public static function _get_metadata(\core_privacy\local\metadata\collection $collection) {

// Add all of the relevant tables and fields to the collection.
$collection->add_database_table('local_metadata', [
Expand All @@ -62,7 +64,7 @@ public static function get_metadata(\core_privacy\local\metadata\collection $col
* @param int $userid The user to search.
* @return contextlist $contextlist The list of contexts used in this plugin.
*/
public static function get_contexts_for_userid(int $userid): \core_privacy\local\request\contextlist {
public static function _get_contexts_for_userid($userid) {
$contextlist = new \core_privacy\local\request\contextlist();
$contextlist->add_user_context($userid);
return $contextlist;
Expand Down Expand Up @@ -141,7 +143,7 @@ public static function delete_data_for_user(\core_privacy\local\request\approved
* @param int $userid The database id of the user.
* @return moodle_recordset
*/
private static function get_user_metdata_rs(int $userid): \moodle_recordset {
private static function get_user_metdata_rs($userid) {
global $DB;

$sql = "SELECT lm.id, lm.data, lmf.name, lmf.description
Expand Down
4 changes: 3 additions & 1 deletion fieldtype/checkbox/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion fieldtype/datetime/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion fieldtype/menu/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion fieldtype/text/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}
4 changes: 3 additions & 1 deletion fieldtype/textarea/classes/privacy/provider.php
Expand Up @@ -30,12 +30,14 @@ class provider implements
// This plugin does not store any personal user data.
\core_privacy\local\metadata\null_provider {

use \core_privacy\local\legacy_polyfill;

/**
* Returns meta data about this system.
*
* @return string
*/
public static function get_reason() : string {
public static function _get_reason() {
return 'privacy:metadata';
}
}

0 comments on commit e88caa8

Please sign in to comment.