# $cart->updateItem()

> Updates existing item.

- Source: `src/Cart.php#L254` <https://github.com/wagnerwagner/merx/blob/2.0.0-alpha.11/src/Cart.php#L254>

```php
$cart->updateItem(string $key, array $data): Wagnerwagner\Merx\Cart
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$key` | `string` | `–` |
| `$data` | `array` | `–` |

## Return type

`Wagnerwagner\Merx\Cart`

## Parent class

`Wagnerwagner\Merx\Cart`
