You are here

public function Price::__toString in Commerce Core 8.2

Gets the string representation of the price.

Return value

string The string representation of the price.

File

modules/price/src/Price.php, line 85

Class

Price
Provides a value object for monetary values.

Namespace

Drupal\commerce_price

Code

public function __toString() : string {
  return Calculator::trim($this->number) . ' ' . $this->currencyCode;
}