Currently in Injector::canCreate() the result of the following check is returned class_exists($class) && ! interface_exists($class).
In case class_exists($class) evaluates to true, ! interface_exists($class) will also always evaluate to true. In the other scenario where class_exists($class) evaluates to false, the statement short circuits as the entire statement is already determined to be false.
This pull request thus removes the right hand side of the logical conjunction: ! interface_exists($class) as it seems to be redundant.
Signed-off-by: Remy Bos 27890746+sjokkateer@users.noreply.github.com
Description
Currently in Injector::canCreate() the result of the following check is returned
class_exists($class) && ! interface_exists($class)
. In caseclass_exists($class)
evaluates to true,! interface_exists($class)
will also always evaluate to true. In the other scenario whereclass_exists($class)
evaluates to false, the statement short circuits as the entire statement is already determined to be false.This pull request thus removes the right hand side of the logical conjunction:
! interface_exists($class)
as it seems to be redundant.