protected function exists(array $expected, $actual): bool
    {
        if (!is_array($actual)) {
            return false;
        }

        return collect($actual)->contains(function ($item) use ($expected) {
            return $this->compare($expected, $item);
        });
    }
protected function exists(array $expected, $actual): bool
    {
        if (!is_array($actual)) {
            return false;
        }

        return collect($actual)->contains(function ($item) use ($expected) {
            return $this->compare($expected, $item);
        });
    }
protected function exists ( array $ expected , $ actual ) : bool { if ( ! is_array ( $ actual ) ) { return false ; } return collect ( $ actual ) -> contains ( function ( $ item ) use ( $ expected ) { return $ this -> compare ( $ expected , $ item ) ; } ) ; }
Does the expected subset exist in the actual array?

@param array $expected
@param mixed $actual
@return bool
Does the expected subset exist in the actual array?