PHP Class PhpMigration\CheckVisitor

Inheritance: extends PhpParser\NodeVisitorAbstract
Mostra file Open project: monque/php-migration

Protected Properties

Property Type Description
$changes Instances of the Change
$class Current class-like node (class, interface, trait)
$classStack Stack for record current class-like node
$code Current code
$file Current fileinfo
$funcStack Stack for record current function-like node
$function Current funciton-like node (function, method, closure)
$node Current node
$spots All Spots emitted by the Changes during check

Public Methods

Method Description
__construct ( $changes = [] ) Empty spots, current state and save the Changes
addSpot ( $cate, $identified, $message, $version = '', $line = null, $file = null ) Add a new spot
afterTraverse ( array $nodes )
beforeTraverse ( array $nodes )
callChange ( $name, $method, $args ) The interface that allow a Change call another Change's method
enterNode ( PhpParser\Node $node )
finish ( )
getClass ( )
getClassName ( )
getCode ( )
getFile ( )
getFunction ( )
getSpots ( ) Get all spots
inClass ( )
inFunction ( )
leaveNode ( PhpParser\Node $node )
prepare ( )
setCode ( $code )
setFile ( SplFileInfo $file )

Method Details

__construct() public method

Empty spots, current state and save the Changes
public __construct ( $changes = [] )

addSpot() public method

Add a new spot
public addSpot ( $cate, $identified, $message, $version = '', $line = null, $file = null )

afterTraverse() public method

public afterTraverse ( array $nodes )
$nodes array

beforeTraverse() public method

public beforeTraverse ( array $nodes )
$nodes array

callChange() public method

The interface that allow a Change call another Change's method
public callChange ( $name, $method, $args )

enterNode() public method

public enterNode ( PhpParser\Node $node )
$node PhpParser\Node

finish() public method

public finish ( )

getClass() public method

public getClass ( )

getClassName() public method

public getClassName ( )

getCode() public method

public getCode ( )

getFile() public method

public getFile ( )

getFunction() public method

public getFunction ( )

getSpots() public method

Get all spots
public getSpots ( )

inClass() public method

public inClass ( )

inFunction() public method

public inFunction ( )

leaveNode() public method

public leaveNode ( PhpParser\Node $node )
$node PhpParser\Node

prepare() public method

public prepare ( )

setCode() public method

public setCode ( $code )

setFile() public method

public setFile ( SplFileInfo $file )
$file SplFileInfo

Property Details

$changes protected_oe property

Instances of the Change
protected $changes

$class protected_oe property

Current class-like node (class, interface, trait)
protected $class

$classStack protected_oe property

Stack for record current class-like node
protected $classStack

$code protected_oe property

Current code
protected $code

$file protected_oe property

Current fileinfo
protected $file

$funcStack protected_oe property

Stack for record current function-like node
protected $funcStack

$function protected_oe property

Current funciton-like node (function, method, closure)
protected $function

$node protected_oe property

Current node
protected $node

$spots protected_oe property

All Spots emitted by the Changes during check
protected $spots