private function validate($name): void {
    try {
      new ReflectionClass($name);
    } catch(ReflectionException $ex) {
      throw new InvalidArgumentException('Expected class name, but got [' . var_export($name, true) . '] instead');
    }
  }
private function validate($name): void {
    try {
      new ReflectionClass($name);
    } catch(ReflectionException $ex) {
      throw new InvalidArgumentException('Expected class name, but got [' . var_export($name, true) . '] instead');
    }
  }
private function validate ( $ name ) : void { try { new ReflectionClass ( $ name ) ; } catch ( ReflectionException $ ex ) { throw new InvalidArgumentException ( 'Expected class name, but got [' . var_export ( $ name , true ) . '] instead' ) ; } }
Ensures the name passed in belongs to a valid class

@throws  InvalidArgumentException  If the value is not a valid class

@param  string  $name  The value to validate

@return  void
Ensures the name passed in belongs to a valid class