/** * @test * @since 5.0.0 */ public function toBoolOnNullReturnsNull() { assertNull(Parse::toBool(null)); }
/** * returns boolean property which is retrieved via is$PROPERTYNAME() * * @param string $propertyName * @return bool */ protected function getBooleanProperty(string $propertyName) : bool { if (count($this->values) === 1 && isset($this->values['__value'])) { return Parse::toBool($this->values['__value']); } if (isset($this->values[$propertyName])) { return Parse::toBool($this->values[$propertyName]); } return false; }