芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/vendor/mockery/mockery/Subset.php
expected = $expected; $this->strict = $strict; } /** * Return a string representation of this Matcher * * @return string */ public function __toString() { return '
formatArray($this->expected) . '>'; } /** * @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. * * @template TMixed * * @param TMixed $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); } /** * @param array $expected Expected subset of data * * @return Subset */ public static function strict(array $expected) { return new static($expected, true); } /** * Recursively format an array into the string representation for this matcher * * @return string */ protected function formatArray(array $array) { $elements = []; foreach ($array as $k => $v) { $elements[] = $k . '=' . (is_array($v) ? $this->formatArray($v) : (string) $v); } return '[' . implode(', ', $elements) . ']'; } }