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