Exemplo n.º 1
0
 /**
  * This method returns the latter value should the former value evaluates
  * to null.
  *
  * @access public
  * @static
  * @param IString\Type $xs                                  the value to be evaluated
  * @param IString\Type $ys                                  the default value
  * @return IString\Type                                     the result
  */
 public static function nvl(IString\Type $xs = null, IString\Type $ys = null) : IString\Type
 {
     return $xs ?? $ys ?? IString\Type::empty_();
 }
Exemplo n.º 2
0
 /**
  * This method tests the "empty" method.
  */
 public function test_empty()
 {
     $p0 = IString\Type::empty_();
     $this->assertInstanceOf('\\Saber\\Data\\IString\\Type', $p0);
     $this->assertTrue(0 == strlen($p0->unbox()));
 }