Skip to content
Snippets Groups Projects
Commit 34822140 authored by Levente Besenyei's avatar Levente Besenyei
Browse files

Code cleanup to make it compliant to Drupal Coding Standards

parent 481d4865
Branches 8.x-3.x
Tags 8.x-3.5
No related merge requests found
<?php
/**
* @file
* Install file for the GDPR module.
*/
/**
* Implements hook_requirements().
*/
function gdpr_requirements($phase) {
$requirements = [];
$t = get_t();
if ($phase === 'runtime' && $definitions = checklistapi_get_checklist_info()) {
$id = 'gdpr_checklist';
......@@ -12,8 +18,8 @@ function gdpr_requirements($phase) {
$percent = round($checklist->getPercentComplete());
$requirements['gdpr_status'] = [
'title' => t('GDPR Preparation'),
'value' => t('Self assessment Checklist: <a href="@url">@percent% done</a>.', [
'title' => $t('GDPR Preparation'),
'value' => $t('Self assessment Checklist: <a href="@url">@percent% done</a>.', [
'@percent' => $percent,
'@url' => '/admin/config/gdpr/checklist',
]),
......
......@@ -50,9 +50,6 @@ function gdpr_checklistapi_checklist_info() {
$content = gdpr_search_content();
$is_published = FALSE;
$in_menu = FALSE;
if (!empty($content)) {
$description = [
'#theme' => 'item_list',
......@@ -75,7 +72,6 @@ function gdpr_checklistapi_checklist_info() {
'#suffix' => '</span>',
'#markup' => t('published'),
];
$is_published = TRUE;
}
else {
$status = [
......@@ -100,7 +96,6 @@ function gdpr_checklistapi_checklist_info() {
$menu_list = [];
if (!empty($mlids)) {
$in_menu = TRUE;
foreach ($mlids as $mlid) {
$link = menu_link_load($mlid);
$menu_list[] = $link['menu_name'];
......
......@@ -8,7 +8,7 @@
/**
* Tests users' data collection pages.
*/
class UserCollectedDataPageTest extends DrupalWebTestCase {
class GdprUserCollectedDataPageTest extends DrupalWebTestCase {
/**
* The user whose collected data to access.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment