You are here

public function Adjustment::multiply in Commerce Core 8.2

Multiplies the adjustment amount by the given number.

Parameters

string $number: The number.

Return value

static The resulting adjustment.

File

modules/order/src/Adjustment.php, line 264

Class

Adjustment
Represents an adjustment.

Namespace

Drupal\commerce_order

Code

public function multiply($number) : Adjustment {
  $definition = [
    'amount' => $this->amount
      ->multiply($number),
  ] + $this
    ->toArray();
  return new static($definition);
}