public function analyze()
{
// f(stdclass &$x)
$this->atomIs('Function')->outIs('ARGUMENTS')->outIs('ARGUMENT')->outIs('TYPEHINT')->codeIsNot(array('callable', 'array', 'string', 'int', 'float', 'bool'))->inIs('TYPEHINT')->atomIs('Variable')->is('reference', true);
$this->prepareQuery();
// f(&$x) and $x->y();
// f(&$x) and $x->y;
$this->atomIs('Function')->outIs('ARGUMENTS')->outIs('ARGUMENT')->is('reference', true)->savePropertyAs('code', 'variable')->inIs('ARGUMENT')->inIs('ARGUMENTS')->outIs('BLOCK')->atomInside(array('Methodcall', 'Property'))->outIs('OBJECT')->samePropertyAs('code', 'variable');
$this->prepareQuery();
// foreach($a as &$b) { $b->method;}
$this->atomIs('Foreach')->outIs('VALUE')->is('reference', true)->savePropertyAs('code', 'variable')->back('first')->outIs('BLOCK')->atomInside(array('Methodcall', 'Property'))->outIs('OBJECT')->samePropertyAs('code', 'variable');
$this->prepareQuery();
// todo $x = new object; then &$x;
}