Skip to content

Commit 3f4dc6a

Browse files
committed
Migrate assertions to Webmozart
1 parent 631627a commit 3f4dc6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hooks/hook_frontpage.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use Webmozart\Assert\Assert;
4+
35
/**
46
* Hook to add the consentAdmin module to the frontpage.
57
*
@@ -8,8 +10,8 @@
810
*/
911
function consentAdmin_hook_frontpage(&$links)
1012
{
11-
assert(is_array($links));
12-
assert(array_key_exists('links', $links));
13+
Assert::isArray($links);
14+
Assert::keyExists($links, 'links');
1315

1416
$links['config'][] = [
1517
'href' => SimpleSAML\Module::getModuleURL('consentAdmin/consentAdmin.php'),

0 commit comments

Comments
 (0)