PDepend\Util\Type::isScalarType PHP Метод

isScalarType() публичный статический Метод

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.
Результат boolean
    public static function isScalarType($image)
    {
        $image = strtolower($image);
        if (isset(self::$scalarTypes[$image]) === true) {
            return true;
        }
        $image = metaphone($image);
        if (isset(self::$scalarTypes[$image]) === true) {
            return true;
        }
        return isset(self::$scalarTypes[soundex($image)]);
    }

Usage Example

Пример #1
0
 /**
  * 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;
 }
All Usage Examples Of PDepend\Util\Type::isScalarType