Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable asserter : missing documentation on isReferenceTo #163

Open
agallou opened this issue Jan 3, 2016 · 2 comments
Open

variable asserter : missing documentation on isReferenceTo #163

agallou opened this issue Jan 3, 2016 · 2 comments

Comments

@agallou
Copy link
Member

agallou commented Jan 3, 2016

Here is how I found to use the isReferenceTo method on the variable asserter :

$variable = new \ArrayObject(array('content'));
$reference = & $variable;

$variable2 = clone $variable;
$reference2 = & $variable2;

$this->variable->setByReferenceWith($reference)->isReferenceTo($variable); // pass
//$this->variable->setByReferenceWith($reference)->isReferenceTo($variable2); // fails

It seems weird to have to use the setByReferenceWith.

@jubianchi is it the right way to use it ?

@Grummfy
Copy link
Member

Grummfy commented Nov 3, 2016

ping @jubianchi & @Hywan can you answer to the question?

@Grummfy
Copy link
Member

Grummfy commented Aug 12, 2017

@jubianchi or @Hywan can you confrm it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants