예제 #1
0
 public function testIsScalar()
 {
     foreach ($this->types as $type => $standard) {
         $typeReflection = new TypeReflection($type);
         $this->assertSame(in_array($type, ['bool', 'boolean', 'string', 'int', 'integer', 'long', 'float', 'double', 'real']), $typeReflection->isScalar(), $type);
     }
 }
예제 #2
0
 public function testIsScalarWithArray()
 {
     $typeReflection = new TypeReflection('array');
     $this->assertFalse($typeReflection->isScalar());
 }