code: public static function create($type)
      {
          switch ($type) {
              case ActionTypes::CREATE:
                  return new CreateDiffItem();
              case ActionTypes::UPDATE:
                  return new UpdateDiffItem();
              case ActionTypes::DELETE:
                  return new DeleteDiffItem();
              default:
                  throw new \InvalidArgumentException("Invalid type {$type}");
          }
      }
docs: Creates DiffItem by type.
  
  @param string $type
  
  @return CreateDiffItem|DeleteDiffItem|UpdateDiffItem
  @throws \InvalidArgumentException