DigestMD5   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 0
loc 20
ccs 0
cts 4
cp 0
rs 10
c 1
b 1
f 0
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createResponse() 0 8 2
1
<?php
2
/**
3
 * Nucleus - XMPP Library for PHP
4
 *
5
 * Copyright (C) 2016, Some rights reserved.
6
 *
7
 * @author Kacper "Kadet" Donat <[email protected]>
8
 *
9
 * Contact with author:
10
 * Xmpp: [email protected]
11
 * E-mail: [email protected]
12
 *
13
 * From Kadet with love.
14
 */
15
16
namespace Kadet\Xmpp\Sasl;
17
18
19
class DigestMD5 extends \Fabiang\Sasl\Authentication\DigestMD5
20
{
21
    /**
22
     * Provides the (main) client response for DIGEST-MD5
23
     * requires a few extra parameters than the other
24
     * mechanisms, which are unavoidable.
25
     *
26
     * @param  string $challenge The digest challenge sent by the server
27
     * @return string            The digest response (NOT base64 encoded)
28
     */
29
    public function createResponse($challenge = null)
30
    {
31
        if(strpos($challenge, 'rspauth=') !== false) {
32
            return '';
33
        }
34
35
        return parent::createResponse($challenge);
36
    }
37
38
}