protected function matches($actual)
{
if ($this->analyzer->isArray($actual) === false) {
throw new \PHPUnit_Framework_Exception('Actual value of ' . __CLASS__ . ' must be an array');
}
$patched = array_replace_recursive($actual, $this->expected);
$asserter = new asserters\phpArray(null, $this->analyzer);
$asserter->setWith($actual);
if ($this->strict) {
$asserter->isIdenticalTo($patched);
} else {
$asserter->isEqualTo($patched);
}
}