protected function validateBitbucketCredentials(array $credentials)
    {
        try {
            $this->getBitbucketAccessToken($credentials);
        } catch (\Exception $e) {
            $message = '<error>Invalid Bitbucket credentials</error>';
            if ($e instanceof BadResponseException && $e->getResponse() && $e->getResponse()->getStatusCode() === 400) {
                $message .= "\n" . 'Ensure that the OAuth consumer key and secret are valid.'
                    . "\n" . 'Additionally, ensure that the OAuth consumer has a callback URL set (even just to <comment>http://localhost</comment>).';
            }

            return $message;
        }

        return TRUE;
    }
protected function validateBitbucketCredentials(array $credentials)
    {
        try {
            $this->getBitbucketAccessToken($credentials);
        } catch (\Exception $e) {
            $message = '<error>Invalid Bitbucket credentials</error>';
            if ($e instanceof BadResponseException && $e->getResponse() && $e->getResponse()->getStatusCode() === 400) {
                $message .= "\n" . 'Ensure that the OAuth consumer key and secret are valid.'
                    . "\n" . 'Additionally, ensure that the OAuth consumer has a callback URL set (even just to <comment>http://localhost</comment>).';
            }

            return $message;
        }

        return TRUE;
    }
protected function validateBitbucketCredentials ( array $ credentials ) { try { $ this -> getBitbucketAccessToken ( $ credentials ) ; } catch ( \ Exception $ e ) { $ message = '<error>Invalid Bitbucket credentials</error>' ; if ( $ e instanceof BadResponseException && $ e -> getResponse ( ) && $ e -> getResponse ( ) -> getStatusCode ( ) === 400 ) { $ message .= "\n" . 'Ensure that the OAuth consumer key and secret are valid.' . "\n" . 'Additionally, ensure that the OAuth consumer has a callback URL set (even just to <comment>http://localhost</comment>).' ; } return $ message ; } return TRUE ; }
Validate Bitbucket credentials.

@param array $credentials

@return string|TRUE
Validate Bitbucket credentials .