Simplify: `$className = is_object($classOrClassName) ? get_class($classOrClassName) : $classOrClassName`.