private function hookNeedsUpdate(Integration $integration, array $hook, array $payload)
    {
        if ($integration->type === 'bitbucket') {
            foreach ($payload as $item => $value) {
                if (!isset($hook[$item])) {
                    return true;
                }
                if ($item === 'events') {
                    sort($value);
                    sort($hook[$item]);
                    if ($value !== $hook[$item]) {
                        return true;
                    }
                }
                if ($hook[$item] !== $value) {
                    return true;
                }
            }

            return false;
        }

        return $this->arraysDiffer($hook, $payload);
    }
private function hookNeedsUpdate(Integration $integration, array $hook, array $payload)
    {
        if ($integration->type === 'bitbucket') {
            foreach ($payload as $item => $value) {
                if (!isset($hook[$item])) {
                    return true;
                }
                if ($item === 'events') {
                    sort($value);
                    sort($hook[$item]);
                    if ($value !== $hook[$item]) {
                        return true;
                    }
                }
                if ($hook[$item] !== $value) {
                    return true;
                }
            }

            return false;
        }

        return $this->arraysDiffer($hook, $payload);
    }
private function hookNeedsUpdate ( Integration $ integration , array $ hook , array $ payload ) { if ( $ integration -> type === 'bitbucket' ) { foreach ( $ payload as $ item => $ value ) { if ( ! isset ( $ hook [ $ item ] ) ) { return true ; } if ( $ item === 'events' ) { sort ( $ value ) ; sort ( $ hook [ $ item ] ) ; if ( $ value !== $ hook [ $ item ] ) { return true ; } } if ( $ hook [ $ item ] !== $ value ) { return true ; } } return false ; } return $ this -> arraysDiffer ( $ hook , $ payload ) ; }
Check if a hook needs updating.

@param \Platformsh\Client\Model\Integration $integration
@param array                                $hook
@param array                                $payload

@return bool
Check if a hook needs updating .