code: public function loadResult(array $result)
      {
          $changed = false;
  
          foreach (['revenue', 'shipping', 'margin', 'orders', 'items', 'average', 'details'] as $property) {
              if ($this->{$property} != $result[$property]) {
                  $this->{$property} = $result[$property];
                  $changed = true;
              }
          }
  
          return $changed;
      }
docs: Loads the calculation result.
  
  @param array $result
  
  @return bool Whether a property has changed.