You are here

public function NumberComparator::accepts in Commerce Core 8.2

File

modules/price/src/Comparator/NumberComparator.php, line 21

Class

NumberComparator
Provides a PHPUnit comparator for numbers cast to strings.

Namespace

Drupal\commerce_price\Comparator

Code

public function accepts($expected, $actual) {
  return is_string($expected) && is_numeric($expected) && is_string($actual) && is_numeric($actual);
}