\Pvra\AnalysersPhp55Features

Class Php55Features

Supports the detection of following features:

  • Generator definitions using the yield - keyword
  • finally
  • Usage of list in foreach foreach($array() as list($a, $b)) {}
  • Arbitrary expressions in the empty construct
  • Array and string dereferencing
  • Classname resolution using Name::class

Summary

Methods
Properties
Constants
__construct()
setOwningAnalyser()
getOwningAnalyser()
enterNode()
No public properties found
No constants found
getResult()
No protected properties found
N/A
No private methods found
$requirementAnalyser
N/A

Properties

$requirementAnalyser

$requirementAnalyser : \Pvra\Analyser

The `Analyser` representing the currently running operation.

Type

\Pvra\Analyser

Methods

__construct()

__construct(\Pvra\Analyser  $requirementAnalyser = null) 

Create an instance of the child Analyser

It is optional to set the related analyser during instance creation. When using this class in the context of an Analyser it will always be ensured that this Analyser will be known to the instance before any node is traversed.

Parameters

\Pvra\Analyser $requirementAnalyser

setOwningAnalyser()

setOwningAnalyser(\Pvra\Analyser  $requirementAnalyser) 

Parameters

\Pvra\Analyser $requirementAnalyser

getOwningAnalyser()

getOwningAnalyser() 

enterNode()

enterNode(\PhpParser\Node  $node) : null|\PhpParser\Node

Called when entering a source node

This method is called when a source node is entered. Contained logic determines the presence of specific syntactical features.

Parameters

\PhpParser\Node $node

Returns

null|\PhpParser\Node —

The nodes should not be modified as other walkers might depend on it.

getResult()

getResult() : \Pvra\AnalysisResult

Get the instance of the currently used `Pvra\AnalysisResult`.

Returns

\Pvra\AnalysisResult