original_string: public function filter_data_for_persistent($data) {
          $data = parent::filter_data_for_persistent($data);
  
          $classname = static::$persistentclass;
          $properties = $classname::properties_definition();
  
          $data = (object) array_filter((array) $data, function($value, $key) use ($properties) {
              return isset($properties[$key]);
          }, ARRAY_FILTER_USE_BOTH);
  
          return $data;
      }
code: public function filter_data_for_persistent($data) {
          $data = parent::filter_data_for_persistent($data);
  
          $classname = static::$persistentclass;
          $properties = $classname::properties_definition();
  
          $data = (object) array_filter((array) $data, function($value, $key) use ($properties) {
              return isset($properties[$key]);
          }, ARRAY_FILTER_USE_BOTH);
  
          return $data;
      }
code_tokens: public function filter_data_for_persistent ( $ data ) { $ data = parent :: filter_data_for_persistent ( $ data ) ; $ classname = static :: $ persistentclass ; $ properties = $ classname :: properties_definition ( ) ; $ data = ( object ) array_filter ( ( array ) $ data , function ( $ value , $ key ) use ( $ properties ) { return isset ( $ properties [ $ key ] ) ; } , ARRAY_FILTER_USE_BOTH ) ; return $ data ; }
docstring: Converts fields.
  
  @param \stdClass $data
  @return \stdClass
docstring_tokens: Converts fields .