code: private function updateObserverState(\StdClass $observer) {
          $this->event->function = $observer->function;
          $observerObject = $observer->observer;
          $observerObject->update($this);
      }
docs: Update the correct observer match with the same name.
  
  @param StdClass $observer