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

Repository.php __call returns throw when no nodes are found! #83

Open
cedriclevarlet opened this issue Sep 10, 2014 · 1 comment
Open

Comments

@cedriclevarlet
Copy link

As the title says the current implementation of the __call method throws the following:

new InvalidArgumentException('Method name must begin with "findBy" or "findOneBy"!');

This happens whenever a findBy or findOneBy is called and no node is found. Whilst this could be intended I do not think this is intuitive and is in fact quite misleading.

I have replaced this implementation the following lines as it seems to be more logical.

} else {
throw new InvalidArgumentException('Method name must begin with "findBy" or "findOneBy"!');
}
return null;

@lphuberdeau
Copy link
Owner

Please submit a pull request request.

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

No branches or pull requests

2 participants