original_string: public function beforeModeration(): bool
      {
          if (method_exists($this->owner, 'beforeModeration')) {
              if (!$this->owner->beforeModeration()) {
                  return false;
              }
          }
  
          $event = new ModelEvent();
          $this->owner->trigger(self::EVENT_BEFORE_MODERATION, $event);
  
          return $event->isValid;
      }
code: public function beforeModeration(): bool
      {
          if (method_exists($this->owner, 'beforeModeration')) {
              if (!$this->owner->beforeModeration()) {
                  return false;
              }
          }
  
          $event = new ModelEvent();
          $this->owner->trigger(self::EVENT_BEFORE_MODERATION, $event);
  
          return $event->isValid;
      }
code_tokens: public function beforeModeration ( ) : bool { if ( method_exists ( $ this -> owner , 'beforeModeration' ) ) { if ( ! $ this -> owner -> beforeModeration ( ) ) { return false ; } } $ event = new ModelEvent ( ) ; $ this -> owner -> trigger ( self :: EVENT_BEFORE_MODERATION , $ event ) ; return $ event -> isValid ; }
docstring: This method is invoked before moderating a record.
  
  @return bool
docstring_tokens: This method is invoked before moderating a record .