Example #1
0
 /**
  * Return Enumerable instance as an object
  *
  * @return    object     Enumerable array converted to an object
  */
 public function toObject()
 {
     return \Nerd\Arr::toObject($this->enumerable);
 }
Example #2
0
 /**
  * @covers \Nerd\Arr::toObject
  */
 public function testArrToObjectFail()
 {
     // Should fail on a normal array
     $obj = Arr::toObject([1, 2, 3]);
     $this->assertFalse(is_object($obj));
 }