protected function check_policy( Token $token, $policy, $permissive_policy, $equal_policy, $non_equal_policy, callable $transform_token ) {

		// Short circuit.
		if ( $permissive_policy === $policy ) {
			return true;
		}

		$transformed = $transform_token( $token->value );

		return ( $equal_policy === $policy && $transformed === $token->value )
			|| ( $non_equal_policy === $policy && $transformed !== $token->value );
	}