# $cart->total()

> Total price of the ListItems

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

```php
$cart->total(): null|Wagnerwagner\Merx\Price
```

## Return type

`null|Wagnerwagner\Merx\Price`

## Description

The tax of the total keeps the tax rate the items share. Items with
different tax rates have no rate in common: `tax->rate` is `null` then and
`tax->price` the sum of their tax amounts. Use `taxRates()` for the
breakdown of such a list. A list whose items all come without a tax has no
tax either: `tax` is `null`.

## Parent class

`Wagnerwagner\Merx\Cart` inherited from `Wagnerwagner\Merx\ListItems`
