Refactors suggested by @HugoGiraudel

What @HugoGiraudel said. The function returns a bool and he variable `$table` is a bool.