You are here

public function ObjectComparator::accepts in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/sebastian/comparator/src/ObjectComparator.php \SebastianBergmann\Comparator\ObjectComparator::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 ArrayComparator::accepts

4 methods override ObjectComparator::accepts()
DateTimeComparator::accepts in vendor/sebastian/comparator/src/DateTimeComparator.php
Returns whether the comparator can compare two values.
DOMNodeComparator::accepts in vendor/sebastian/comparator/src/DOMNodeComparator.php
Returns whether the comparator can compare two values.
ExceptionComparator::accepts in vendor/sebastian/comparator/src/ExceptionComparator.php
Returns whether the comparator can compare two values.
MockObjectComparator::accepts in vendor/sebastian/comparator/src/MockObjectComparator.php
Returns whether the comparator can compare two values.

File

vendor/sebastian/comparator/src/ObjectComparator.php, line 25

Class

ObjectComparator
Compares objects for equality.

Namespace

SebastianBergmann\Comparator

Code

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