public function testtypeTypeValue()
 {
     $this->assertEquals('integer', TypeProvider::type(1));
     $this->assertEquals('string', TypeProvider::type('1'));
     $this->assertEquals('array', TypeProvider::type(array('1', 0)));
     $this->assertEquals('object', TypeProvider::type(new \stdClass()));
     $this->assertEquals('boolean', TypeProvider::type(true));
 }
示例#2
0
 /**
  * Return type of value
  *
  * @param $value
  * @return string
  */
 public function type($value) : string
 {
     return TypeProvider::type($value);
 }