src/Kunstmaan/AdminBundle/Helper/Security/Acl/Permission/MaskBuilder.php
public function resolveMask($code)
    {
        if (is_string($code)) {
            if (!defined($name = sprintf('static::MASK_%s', strtoupper($code)))) {
                throw new \InvalidArgumentException(sprintf('The code "%s" is not supported', $code));
            }

            return constant($name);
        }

        if (!is_int($code)) {
            throw new \InvalidArgumentException('$code must be an integer.');
        }

        return $code;
    }
public function resolveMask($code)
    {
        if (is_string($code)) {
            if (!defined($name = sprintf('static::MASK_%s', strtoupper($code)))) {
                throw new \InvalidArgumentException(sprintf('The code "%s" is not supported', $code));
            }

            return constant($name);
        }

        if (!is_int($code)) {
            throw new \InvalidArgumentException('$code must be an integer.');
        }

        return $code;
    }
public function resolveMask ( $ code ) { if ( is_string ( $ code ) ) { if ( ! defined ( $ name = sprintf ( 'static::MASK_%s' , strtoupper ( $ code ) ) ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The code "%s" is not supported' , $ code ) ) ; } return constant ( $ name ) ; } if ( ! is_int ( $ code ) ) { throw new \ InvalidArgumentException ( '$code must be an integer.' ) ; } return $ code ; }
Returns the mask for the passed code.

@param mixed $code

@return int

@throws \InvalidArgumentException
Returns the mask for the passed code .