Debian Codegraph @

extensions/AbuseFilter/includes/FilterUtils.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\AbuseFilter;
4
5 use MediaWiki\Extension\AbuseFilter\Filter\Flags;
6
7 /**
8 * @internal
9 */
10 class FilterUtils {
11 /**
12 * Given a bitmask of privacy levels, return if the hidden flag is set
13 *
14 * @param int $privacyLevel
15 * @return bool
16 */
17 public static function isHidden( int $privacyLevel ) {
18 return (bool)( Flags::FILTER_HIDDEN & $privacyLevel );
19 }
20
21 /**
22 * Given a bitmask, return if the protected flag is set
23 *
24 * @param int $privacyLevel
25 * @return bool
26 */
27 public static function isProtected( int $privacyLevel ) {
28 return (bool)( Flags::FILTER_USES_PROTECTED_VARS & $privacyLevel );
29 }
30 }