BetterReflection icon indicating copy to clipboard operation
BetterReflection copied to clipboard

When more than one unique symbol is found in a source locator, decide what to do

Open Ocramius opened this issue 9 years ago • 0 comments

Following code is perfectly valid in BetterReflection, but the outcome is rather unexpected:

class Foo {}
class Foo {}
function bar() {}
function bar() {}
const BAZ = 'baz';
const BAZ = 'baz';

Things that better reflection could do:

  • throw an exception if an API such as getClass($name) is used (expecting 1 result, found 2)
  • return all reflections if an API such as getClassesByName($name) is used (2 results)

This is yet to be decided.

Ocramius avatar Jul 19 '15 20:07 Ocramius