Get a symbol type key for storing in the scope name cache.

@deprecated No longer used. Scope type should be passed into ensureCanDefine directly.
@codeCoverageIgnore

@param Stmt $stmt

@return string
543572
protected function getScopeType(Stmt $stmt)
    {
        if ($stmt instanceof Class_) {
            return self::CLASS_TYPE;
        } elseif ($stmt instanceof Interface_) {
            return self::INTERFACE_TYPE;
        } elseif ($stmt instanceof Trait_) {
            return self::TRAIT_TYPE;
        }
    }
163687
public function getScopeType($scope = 'public')
    {
        switch ($scope) {
            case 'public':
                $type = \ReflectionMethod::IS_PUBLIC;
                break;
            case 'protected':
                $type = \ReflectionMethod::IS_PROTECTED;
                break;
            case 'private':
                $type = \ReflectionMethod::IS_PRIVATE;
                break;
        }

        return $type;
    }
118345
private function getStaffId($st)
    {
        $staff_id = $st->find('a', 0)->href;
        $staff_id = explode('/', $staff_id);

        return $staff_id[4];
    }
427368
function token_name ( $t ){
		$t = self::token_to_symbol( $t );
		if( ! is_int($t) ){
			return $t;
		}
		return $this->Lex->name( $t );
	}
952617
public static function closeCursor($stmt) 
    {
        if (self::$_cc_action == self::CURSOR_NOTHING) {
            return;
        }

        if (self::$_cc_action == self::CURSOR_CLOSE && is_object($stmt)) {
            $stmt->closeCursor();
        } else {
            $stmt = null;
        }
    }
1247220
private function bind($stmt) {

		$meta 	= $stmt -> result_metadata();
		$double = [];
		$vars 	= [];

		if($stmt -> field_count > 0) {

			while($field = $meta -> fetch_field()) {

				$columnname  = $field -> name;
				${$columnname} = null;
				
				if(true === array_key_exists($columnname, $vars)) {
					$double[] = $columnname;
				}
				else {
					$vars[$columnname] = &${$columnname};
				}
			}
		}

		if(count($double) > 0) {
			return trigger_error(sprintf('Column %s in field list is ambiguous', implode(', ', array_unique($double))));
		}

		call_user_func_array([$stmt, 'bind_result'], $vars);

		return $vars;
	}
269724
protected function validateInterfaceStatement(Interface_ $stmt)
    {
        $this->ensureCanDefine($stmt, self::INTERFACE_TYPE);
        $this->ensureInterfacesExist($stmt->extends, $stmt);
    }
212178
protected function fetchAsAssoc(Statement $stmt)
    {
        $stmt->setFetchMode(\PDO::FETCH_ASSOC);

        return $stmt->fetchAll(\PDO::FETCH_ASSOC);
    }
117590
protected function keyForScope( $model )
	{
		return implode( '-', array_map( function ( $column ) use ( $model )
		{
			$value = $model->getAttribute( $column );

			if ( is_null( $value ) )
				return 'NULL';

			return $value;
		}, $model->getScopedColumns() ) );
	}
1147111
protected function _process( $stmt )
	{
		$msg = 'Changing code from "product" to "default" in "mshop_product_type"';
		$this->_msg($msg, 0);

		if ($this->_schema->tableExists('mshop_product_type') )
		{
			$result = $this->_conn->create( $stmt )->execute();
			$cntRows = $result->affectedRows();
			$result->finish();

			if ( $cntRows ) {
				$this->_status( sprintf( 'migrated (%1$d)', $cntRows ) );
			} else {
				$this->_status( 'OK' );
			}
		}
		else
		{
			$this->_status('OK');
		}
	}
23134
protected function bindParameter(\PDOStatement $stmt, $params, $types)
    {
        !is_array($params) && $params = array($params);
        !is_array($types) && $types = array($types);

        $isIndex = is_int(key($params));
        $index = 1;

        foreach ($params as $name => $param) {
            // Number index parameters
            if ($isIndex) {
                if (isset($types[$index - 1])) {
                    $stmt->bindValue($index, $param, $types[$index - 1]);
                } else {
                    $stmt->bindValue($index, $param);
                }
                $index++;
            // Named parameters
            } else {
                if (isset($types[$name])) {
                    $stmt->bindValue($name, $param, $types[$name]);
                } else {
                    $stmt->bindValue($name, $param);
                }
            }
        }
    }
1012899
public function hydrateAll($stmt, $resultSetMapping, array $hints = [])
    {
        if ($logger = $this->_em->getConfiguration()->getHydrationLogger()) {
            $type = null;

            if ($this instanceof ObjectHydrator) {
                $type = 'ObjectHydrator';
            } elseif ($this instanceof ArrayHydrator) {
                $type = 'ArrayHydrator';
            } elseif ($this instanceof ScalarHydrator) {
                $type = 'ScalarHydrator';
            } elseif ($this instanceof SimpleObjectHydrator) {
                $type = 'SimpleObjectHydrator';
            } elseif ($this instanceof SingleScalarHydrator) {
                $type = 'SingleScalarHydrator';
            }

            $logger->start($type);
        }

        $result = parent::hydrateAll($stmt, $resultSetMapping, $hints);

        if ($logger) {
            if (is_array($result) || $result instanceof Countable) {
                $logger->stop(sizeof($result), $resultSetMapping->getAliasMap());
            }
        }

        return $result;
    }
1138410
public static function getDefinitelyEvaluatedExpression(PhpParser\Node\Expr $stmt)
    {
        if ($stmt instanceof PhpParser\Node\Expr\BinaryOp) {
            if ($stmt instanceof PhpParser\Node\Expr\BinaryOp\BooleanAnd
                || $stmt instanceof PhpParser\Node\Expr\BinaryOp\LogicalAnd
                || $stmt instanceof PhpParser\Node\Expr\BinaryOp\LogicalXor
            ) {
                return self::getDefinitelyEvaluatedExpression($stmt->left);
            }

            return $stmt;
        }

        return $stmt;
    }
1066596
public function pStmt_If(Stmt\If_ $node)
    {
        return sprintf(
            "%s (%s) %s%s\n%s%s%s",
            $this->color('if', SyntaxHighlighterConfig::TYPE_KEYWORD),
            $this->p($node->cond),
            $this->color('{', SyntaxHighlighterConfig::TYPE_BRACE),
            $this->pStmts($node->stmts),
            $this->color('}', SyntaxHighlighterConfig::TYPE_BRACE),
            $this->pImplode($node->elseifs),
            (null !== $node->else ? $this->p($node->else) : '')
        );
    }
374390
protected function getScopeDescription(Scope $scope) : string {
        if ($scope->isInClass()) {
            $description = $scope->getClassReflection()->getName();
            if ($scope->getFunctionName())       $description .= '::'.$scope->getFunctionName().'()';
            if ($scope->isInAnonymousFunction()) $description .= '{closure}';
            return $description;
        }

        if ($scope->getFunctionName()) {
            $description = $scope->getFunctionName().'()';
            if ($scope->isInAnonymousFunction()) $description .= '{closure}';
            return $description;
        }

        $description = $scope->isInAnonymousFunction() ? '{closure}' : '{main}';
        $description = trim($scope->getNamespace().'\\'.$description, '\\');
        return $description;
    }
396657
def get_primitive_type(stmt):
    
    type_obj = stmt.search_one('type')
    type_name = getattr(type_obj, 'arg', None)
    typedef_obj = getattr(type_obj, 'i_typedef', None)
    if typedef_obj:
        type_name = get_primitive_type(typedef_obj)
    elif type_obj and not check_primitive_type(type_obj):
        raise Exception('%s is not a primitive! Incomplete parse tree?' %
                        type_name)
    return type_name
204673
function get_type($ext)
    {
        $ext = strtolower($ext);
        // get position of last dot
        $dot_pos = strrpos($ext, '.');
        if ($dot_pos !== false) $ext = substr($ext, $dot_pos+1);
        if (($ext != '') && isset($this->mime_types[$ext])) return $this->mime_types[$ext];
        return false;
    }