/home/techb158/ileadtechnology.com/vendor/mockery/mockery/library/Mockery/Matcher
Edit: /home/techb158/ileadtechnology.com/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php (2337B)
expected = $expected;
$this->strict = $strict;
}
/**
* @param array $expected Expected subset of data
*
* @return Subset
*/
public static function strict(array $expected)
{
return new static($expected, true);
}
/**
* @param array $expected Expected subset of data
*
* @return Subset
*/
public static function loose(array $expected)
{
return new static($expected, false);
}
/**
* Check if the actual value matches the expected.
*
* @param mixed $actual
* @return bool
*/
public function match(&$actual)
{
if (!is_array($actual)) {
return false;
}
if ($this->strict) {
return $actual === array_replace_recursive($actual, $this->expected);
}
return $actual == array_replace_recursive($actual, $this->expected);
}
/**
* Return a string representation of this Matcher
*
* @return string
*/
public function __toString()
{
$return = '
expected as $k=>$v) {
$elements[] = $k . '=' . (string) $v;
}
$return .= implode(', ', $elements) . ']>';
return $return;
}
}