diff --git a/_ide_helper.php b/_ide_helper.php new file mode 100644 index 0000000..8d0443c --- /dev/null +++ b/_ide_helper.php @@ -0,0 +1,45 @@ +matchWith( + * collect([ 1,2,5,6,8,10,11,13,14 ]), + * function($a, $b) { return $a <=> $b; }, + * function($a, $b) { echo "$a matches $b"; }, + * function($a) { echo "$a was not found in b"; }, + * function($b) { echo "$b was not found in a"; }, + * ); + * ``` + * + * @param Collection $b A collection to match up with + * @param callable $comparator A comparator function, to match orderable elements using a <=> b + * @param callable $matched A callback to be executed on each matched pair + * @param callable $unmatchedA A callback to be executed for each unmatched item in the a collection + * @param callable $unmatchedB A callback to be executed on each unmatched item in the b collection + * @return $this + */ + public function matchWith(Collection $b, callable $comparator, callable $matched, callable $unmatchedA = null, callable $unmatchedB = null): self + { + return $this; + } + } +}