Closed sjokkateer closed 2 years ago
@Ocramius I see, thank you for your reply. There is one more thing, albeit a bit offtopic for this pull request.
It is with regards to Injector::class#L166-L171, the string message would suggest there might be a logic bug in the conditional where ! class_exists($class) || interface_exists($class)
should be either: ! (class_exists($class) || interface_exists($class))
or its logical equivalent: ! class_exists($class) && ! interface_exists($class)
or the string (exception message) might be in need of an update, is this correct and if so which would it be? Also, it seems that if an interface would get to that point, ! class_exists($class)
would short circuit the conditional.
If there is something I am completely overlooking that makes my comment invalid then please inform me and forgive me for my lack of knowledge!
is this correct and if so which would it be?
I would not really know myself: a test case would highlight that 😁
Signed-off-by: Remy Bos 27890746+sjokkateer@users.noreply.github.com
Description
Small refactor, reducing code duplication.