public function combine($arr) : Collection
    {
        if($arr instanceof Collection) {
            $arr = $arr->getAll();
        }

        if(!is_array($arr)) {
            return new static([]);
        }

        return new static(array_combine($this->_data, $arr));
    }
public function combine($arr) : Collection
    {
        if($arr instanceof Collection) {
            $arr = $arr->getAll();
        }

        if(!is_array($arr)) {
            return new static([]);
        }

        return new static(array_combine($this->_data, $arr));
    }
public function combine ( $ arr ) : Collection { if ( $ arr instanceof Collection ) { $ arr = $ arr -> getAll ( ) ; } if ( ! is_array ( $ arr ) ) { return new static ( [ ] ) ; } return new static ( array_combine ( $ this -> _data , $ arr ) ) ; }
Combines this and another array and returns a new object.

The resulting array will contain the values of this array as key and the values
of the parameter as values:

```php
$keys = new Collection([
"foo" => "bar"
]);
$values = new Collection([
"test" => "test"
]);

$newCollection = $keys->combine($values);
// $newCollection = new Collection([
//     "bar" => "test"
// ]);
```

@param array|\Alexya\Tools\Collection $arr Array to combine.

@return \Alexya\Tools\Collection The combination of this array and `$arr`.
Combines this and another array and returns a new object .