protected function duplicateComparator($strict)
    {
        if ($strict) {
            return function ($a, $b) {
                return $a === $b;
            };
        }

        return function ($a, $b) {
            return $a == $b;
        };
    }
protected function duplicateComparator($strict)
    {
        if ($strict) {
            return function ($a, $b) {
                return $a === $b;
            };
        }

        return function ($a, $b) {
            return $a == $b;
        };
    }
protected function duplicateComparator ( $ strict ) { if ( $ strict ) { return function ( $ a , $ b ) { return $ a === $ b ; } ; } return function ( $ a , $ b ) { return $ a == $ b ; } ; }
Get the comparison function to detect duplicates.

@param  bool  $strict
@return \Closure
Get the comparison function to detect duplicates .