original_string: protected function populate(AbstractResponse $object, array $data)
      {
          $reflect = new ReflectionClass($object);
  
          $properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
  
          foreach ($properties as $property) {
              if (array_key_exists($property->name, $data)) {
                  $object->{$property->name} = $this->getValueByAnnotatedType($property, $data[$property->name]);
              }
          }
  
          return $object;
      }
code: protected function populate(AbstractResponse $object, array $data)
      {
          $reflect = new ReflectionClass($object);
  
          $properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
  
          foreach ($properties as $property) {
              if (array_key_exists($property->name, $data)) {
                  $object->{$property->name} = $this->getValueByAnnotatedType($property, $data[$property->name]);
              }
          }
  
          return $object;
      }
code_tokens: protected function populate ( AbstractResponse $ object , array $ data ) { $ reflect = new ReflectionClass ( $ object ) ; $ properties = $ reflect -> getProperties ( ReflectionProperty :: IS_PUBLIC ) ; foreach ( $ properties as $ property ) { if ( array_key_exists ( $ property -> name , $ data ) ) { $ object -> { $ property -> name } = $ this -> getValueByAnnotatedType ( $ property , $ data [ $ property -> name ] ) ; } } return $ object ; }
docstring: Populates object with data.
  
  @param AbstractResponse $object
  @param array $data
  @return AbstractResponse
docstring_tokens: Populates object with data .