This method will return true when the given type identifier is in
the list of scalar/none-object types.
public static isScalarType ( string $image ) : boolean | ||
$image | string | The type identifier. |
return | boolean |
/** * Extracts non scalar types from a field doc comment and creates a * matching type instance. * * @return \PDepend\Source\AST\ASTClassOrInterfaceReference * @since 0.9.6 */ private function parseFieldDeclarationClassOrInterfaceReference() { $annotations = $this->parseVarAnnotation($this->docComment); foreach ($annotations as $annotation) { if (Type::isScalarType($annotation) === false) { return $this->builder->buildAstClassOrInterfaceReference($annotation); } } return null; }
/** * testIsScalarTypeReturnsTrueSoundex * * @return void */ public function testIsScalarTypeReturnsTrueSoundex() { $this->assertTrue(Type::isScalarType('Imteger')); }