\Trismegiste\Mondrian\VisitorParamRefactor

ParamRefactor replaces the class of a param by its contract

Changes could be made to the current PhpFile

Summary

Methods
Properties
Constants
beforeTraverse()
enterNode()
__construct()
No public properties found
No constants found
resolveClassName()
getNamespacedName()
enterParam()
$namespace
$aliases
$currentPhpFile
$context
N/A
No private methods found
No private properties found
N/A

Properties

$namespace

$namespace : null|\Trismegiste\Mondrian\Visitor\PHPParser_Node_Name

Type

null|\Trismegiste\Mondrian\Visitor\PHPParser_Node_Name — Current namespace

$aliases

$aliases : array

Type

array — Currently defined namespace and class aliases

$currentPhpFile

$currentPhpFile : 

current file

Type

$context

$context : 

Type

Methods

beforeTraverse()

beforeTraverse(array  $nodes) 

Parameters

array $nodes

enterNode()

enterNode(\PHPParser_Node  $node) 

Parameters

\PHPParser_Node $node

resolveClassName()

resolveClassName(\PHPParser_Node_Name  $src) : \PHPParser_Node_Name|\PHPParser_Node_Name_FullyQualified

resolve the Name with current namespace and alias

Parameters

\PHPParser_Node_Name $src

Returns

\PHPParser_Node_Name|\PHPParser_Node_Name_FullyQualified

getNamespacedName()

getNamespacedName(\PHPParser_Node  $node) : string

Helper : get the FQCN of the given $node->name

Parameters

\PHPParser_Node $node

Returns

string

enterParam()

enterParam(\PHPParser_Node_Param  $node) 

Visit a Param Node

Parameters

\PHPParser_Node_Param $node