public function DoubleComparator::accepts in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/sebastian/comparator/src/DoubleComparator.php \SebastianBergmann\Comparator\DoubleComparator::accepts()
Returns whether the comparator can compare two values.
Parameters
mixed $expected The first value to compare:
mixed $actual The second value to compare:
Return value
bool
Overrides NumericComparator::accepts
File
- vendor/
sebastian/ comparator/ src/ DoubleComparator.php, line 32
Class
- DoubleComparator
- Compares doubles for equality.
Namespace
SebastianBergmann\ComparatorCode
public function accepts($expected, $actual) {
return (is_double($expected) || is_double($actual)) && is_numeric($expected) && is_numeric($actual);
}