public function isRelationship(array $columns)
    {
        $matched = array_filter($columns, function($column)
        {
            // As soon as we find that a property does not
            // have a dot '.' in it we assume it is a relationship,
            // unless it is the id of a node which is where we look
            // at a pattern that matches id(any character here).
            if (preg_match('/^([a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+)|(id\(.*\))$/', $column)) return false;

            return true;
        });

        return  count($matched) > 1 ? true : false;
    }
public function isRelationship(array $columns)
    {
        $matched = array_filter($columns, function($column)
        {
            // As soon as we find that a property does not
            // have a dot '.' in it we assume it is a relationship,
            // unless it is the id of a node which is where we look
            // at a pattern that matches id(any character here).
            if (preg_match('/^([a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+)|(id\(.*\))$/', $column)) return false;

            return true;
        });

        return  count($matched) > 1 ? true : false;
    }
public function isRelationship ( array $ columns ) { $ matched = array_filter ( $ columns , function ( $ column ) { // As soon as we find that a property does not // have a dot '.' in it we assume it is a relationship, // unless it is the id of a node which is where we look // at a pattern that matches id(any character here). if ( preg_match ( '/^([a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+)|(id\(.*\))$/' , $ column ) ) return false ; return true ; } ) ; return count ( $ matched ) > 1 ? true : false ; }
Determine whether the intended result is a relationship result between nodes,
we can tell by the format of the requested properties, in case the requested
properties were in the form of 'user.name' we are pretty sure it is an attribute
of a node, otherwise if they're plain strings like 'user' and they're more than one then
the reference is assumed to be a Node placeholder rather than a property.

@param  \Everyman\Neo4j\Query\Row $row
@return boolean
Determine whether the intended result is a relationship result between nodes we can tell by the format of the requested properties in case the requested properties were in the form of user . name we are pretty sure it is an attribute of a node otherwise if they re plain strings like user and they re more than one then the reference is assumed to be a Node placeholder rather than a property .