You are here

public function Adjustment::divide in Commerce Core 8.2

Divides 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 281

Class

Adjustment
Represents an adjustment.

Namespace

Drupal\commerce_order

Code

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