You're doing this operation on $method->getName() and in some cases discarding the result immediately.