public function getType($type)
    {
        $aliases = array(
            'int'    => 'integer',
            'bool'   => 'boolean',
            'double' => 'float',
            'object' => '\\stdClass'
        );
        $default = array(
            'integer', 'boolean', 'float', '\\stdClass', 'callable', 'string', 'resource', 'void', 'mixed'
        );
        $typeHintEnabled = false;

        if (isset($aliases[$type])) {
            $type = $aliases[$type];
        }

        if (!in_array($type, $default)) {
            $typeHintEnabled = true;
        }

        return array(
            'name' => $type,
            'hint' => $typeHintEnabled
        );
    }
public function getType($type)
    {
        $aliases = array(
            'int'    => 'integer',
            'bool'   => 'boolean',
            'double' => 'float',
            'object' => '\\stdClass'
        );
        $default = array(
            'integer', 'boolean', 'float', '\\stdClass', 'callable', 'string', 'resource', 'void', 'mixed'
        );
        $typeHintEnabled = false;

        if (isset($aliases[$type])) {
            $type = $aliases[$type];
        }

        if (!in_array($type, $default)) {
            $typeHintEnabled = true;
        }

        return array(
            'name' => $type,
            'hint' => $typeHintEnabled
        );
    }
public function getType ( $ type ) { $ aliases = array ( 'int' => 'integer' , 'bool' => 'boolean' , 'double' => 'float' , 'object' => '\\stdClass' ) ; $ default = array ( 'integer' , 'boolean' , 'float' , '\\stdClass' , 'callable' , 'string' , 'resource' , 'void' , 'mixed' ) ; $ typeHintEnabled = false ; if ( isset ( $ aliases [ $ type ] ) ) { $ type = $ aliases [ $ type ] ; } if ( ! in_array ( $ type , $ default ) ) { $ typeHintEnabled = true ; } return array ( 'name' => $ type , 'hint' => $ typeHintEnabled ) ; }
Normalize PHP type

@param string $type PHP type

@return array An array includes key below [name, hint]
Normalize PHP type