Neo4j-PHP-OGM
Neo4j-PHP-OGM copied to clipboard
Repository.php __call returns throw when no nodes are found!
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;
Please submit a pull request request.