src/Synapse/Validator/ValidationErrorFormatter.php
protected function getPropertyPathAsArray(ConstraintViolationInterface $violation)
    {
        $path = $violation->getPropertyPath();

        // Remove outer brackets and explode fields into array
        $path = substr($path, 1, strlen($path) - 2);

        return explode('][', $path);
    }
protected function getPropertyPathAsArray(ConstraintViolationInterface $violation)
    {
        $path = $violation->getPropertyPath();

        // Remove outer brackets and explode fields into array
        $path = substr($path, 1, strlen($path) - 2);

        return explode('][', $path);
    }
protected function getPropertyPathAsArray ( ConstraintViolationInterface $ violation ) { $ path = $ violation -> getPropertyPath ( ) ; // Remove outer brackets and explode fields into array $ path = substr ( $ path , 1 , strlen ( $ path ) - 2 ) ; return explode ( '][' , $ path ) ; }
Given a constraint violation, return its property path as an array

Example:
Property path of violation: "[foo][0][bar][baz]"
Return value: array('foo', '0', 'bar', 'baz')

@param  ConstraintViolationInterface $violation Violation whose path to return
@return array
Given a constraint violation return its property path as an array