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\ComparatorCode
public function accepts($expected, $actual) {
return is_string($expected) && is_numeric($expected) && is_string($actual) && is_numeric($actual);
}