- throw new NoClassException(array($factoryInstance, $className), self::EXCEPTION_CLASS_NOT_FOUND);
- } elseif (count($classNameParts) < 3) {
+ throw new NoClassException([$factoryInstance, $fullClassName], FrameworkInterface::EXCEPTION_CLASS_NOT_FOUND);
+ }
+
+ // Split class name on backslash to check naming-convention
+ $classNameParts = explode("\\", $fullClassName);
+
+ // Okay, does it follow naming-convention?
+ if (count($classNameParts) < 4) {