Exemplo n.º 1
0
 /**
  * @test
  * @since  5.0.0
  */
 public function toBoolOnNullReturnsNull()
 {
     assertNull(Parse::toBool(null));
 }
Exemplo n.º 2
0
 /**
  * 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;
 }