You are here

class VariableInfo in Coder 8.2

Holds details of a variable within a scope.

@category PHP @package PHP_CodeSniffer @author Sam Graham <php-codesniffer-variableanalysis BLAHBLAH illusori.co.uk> @copyright 2011 Sam Graham <php-codesniffer-variableanalysis BLAHBLAH illusori.co.uk> @link http://pear.php.net/package/PHP_CodeSniffer

Hierarchy

Expanded class hierarchy of VariableInfo

File

coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php, line 60

Namespace

DrupalPractice\Sniffs\CodeAnalysis
View source
class VariableInfo {
  public $name;

  /**
   * What scope the variable has: local, param, static, global, bound
   */
  public $scopeType;
  public $typeHint;
  public $passByReference = false;
  public $firstDeclared;
  public $firstInitialized;
  public $firstRead;
  public $ignoreUnused = false;
  public $lastAssignment;
  static $scopeTypeDescriptions = array(
    'local' => 'variable',
    'param' => 'function parameter',
    'static' => 'static variable',
    'global' => 'global variable',
    'bound' => 'bound variable',
  );

  /**
   * Constructor.
   *
   * @param string $varName
   */
  function __construct($varName) {
    $this->name = $varName;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
VariableInfo::$firstDeclared public property
VariableInfo::$firstInitialized public property
VariableInfo::$firstRead public property
VariableInfo::$ignoreUnused public property
VariableInfo::$lastAssignment public property
VariableInfo::$name public property
VariableInfo::$passByReference public property
VariableInfo::$scopeType public property What scope the variable has: local, param, static, global, bound
VariableInfo::$scopeTypeDescriptions static property
VariableInfo::$typeHint public property
VariableInfo::__construct function Constructor.