Assert that the value is a boolean type.

@throws AssertionFailureException

@return self
545035
public function boolean()
    {
        $message = ['%s is {{not|}} a boolean', $this->value];
        $this->assert(is_bool($this->value), $message);

        return $this;
    }
799695
public boolean asBoolean(Object value) {

        if (value == null) {
            return false;
        }

        if (value instanceof Boolean) {
            return (Boolean) value;
        }

        return true;
    }
941848
public function setChecked($value=true){
		if($value===true){
			$this->getDataField()->setProperty("checked", "checked");
		}else{
			$this->getDataField()->removeProperty("checked");
		}
		return $this;
	}
1029606
public PactDslJsonArray booleanType() {
      generators.addGenerator(Category.BODY, rootPath + appendArrayIndex(1), RandomBooleanGenerator.INSTANCE);
      body.put(true);
        matchers.addRule(rootPath + appendArrayIndex(0), TypeMatcher.INSTANCE);
        return this;
    }
115137
public static void assertTrue(String message, boolean value) {
        if (value) {
            pass(message);
        } else {
            fail(message, null);
        }
    }
789610
public function persistent(bool $value = true): self
    {
        return $this->option(PDO::ATTR_PERSISTENT, $value);
    }
753368
public function assertSingular(): self
    {
        if ($this->minimum > 1 || $this->maximum > 1 || $this->isAlways) {
            throw new InvalidSingularCardinalityException($this);
        }

        return $this;
    }
700419
static public function boolean($value, $message = null, $propertyPath = null)
        {
            if ( ! is_bool($value)) {
                $message = $message ?: sprintf(
                    'Value "%s" is not a boolean.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_BOOLEAN, $propertyPath);
            }
        }
374780
public static Boolean toBoolean(Object o) throws PageException {
	if (o instanceof Boolean) return (Boolean) o;
	return toBooleanValue(o) ? Boolean.TRUE : Boolean.FALSE;

    }
459334
public static Boolean assertTrue(Boolean value, String message) {
        if (!Boolean.valueOf(value))
            throw new IllegalArgumentException(message);
        return value;
    }
1074501
public boolean booleanValue()
    {
        final String value = getInternal(null, false);
        if (value == null) {
            return false;
        }
        return toBoolean(value);
    }
42927
@Override
  public boolean getBooleanCellValue() {
    CellType cellType = getCellType();
    switch(cellType) {
      case BLANK:
        return false;
      case BOOLEAN:
        return rawContents != null && TRUE_AS_STRING.equals(rawContents);
      case FORMULA:
        throw new NotSupportedException();
      default:
        throw typeMismatch(CellType.BOOLEAN, cellType, false);
    }
  }
1106241
public function setValue($value) : self
    {
        if (is_bool($value)) {
            $value = ($value == true) ? '1' : '0';
        }

        $this->field->addAttribute('value', !is_null($value) ? (string) $value : '');

        return $this;
    }
1161094
function isTruthy(value, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && !value) {
        throw LogicException.throw(assertionTypes.IS_TRUTHY, value, message, id);
    }
}
579750
def assert_bool(dist, attr, value):
    """"""
    if bool(value) != value:
        raise DistutilsSetupError(
            "%r must be a boolean value (got %r)" % (attr,value)
        )
103538
public static void assertFalse(String message, boolean value) {
        if (!value) {
            pass(message);
        } else {
            fail(message, null);
        }
    }
77512
def checked(self, value):
        

        if value is not None:
            assert type(value) is bool, "'{0}' attribute: '{1}' type is not 'bool'!".format("checked", value)
        self.set_checked(value)