src/ReflectionEngine.php
public static function parseClassProperty($fullClassName, $propertyName)
    {
        $class      = self::parseClass($fullClassName);
        $classNodes = $class->stmts;

        foreach ($classNodes as $classLevelNode) {
            if ($classLevelNode instanceof Property) {
                foreach ($classLevelNode->props as $classProperty) {
                    if ($classProperty->name->toString() == $propertyName) {
                        return [$classLevelNode, $classProperty];
                    }
                }
            }
        }

        throw new \InvalidArgumentException("Property $propertyName was not found in the $fullClassName");
    }
public static function parseClassProperty($fullClassName, $propertyName)
    {
        $class      = self::parseClass($fullClassName);
        $classNodes = $class->stmts;

        foreach ($classNodes as $classLevelNode) {
            if ($classLevelNode instanceof Property) {
                foreach ($classLevelNode->props as $classProperty) {
                    if ($classProperty->name->toString() == $propertyName) {
                        return [$classLevelNode, $classProperty];
                    }
                }
            }
        }

        throw new \InvalidArgumentException("Property $propertyName was not found in the $fullClassName");
    }
public static function parseClassProperty ( $ fullClassName , $ propertyName ) { $ class = self :: parseClass ( $ fullClassName ) ; $ classNodes = $ class -> stmts ; foreach ( $ classNodes as $ classLevelNode ) { if ( $ classLevelNode instanceof Property ) { foreach ( $ classLevelNode -> props as $ classProperty ) { if ( $ classProperty -> name -> toString ( ) == $ propertyName ) { return [ $ classLevelNode , $ classProperty ] ; } } } } throw new \ InvalidArgumentException ( "Property $propertyName was not found in the $fullClassName" ) ; }
Parses class property

@param string $fullClassName Name of the class
@param string $propertyName Name of the property

@return array Pair of [Property and PropertyProperty] nodes
Parses class property