ThreemaGateway_Session::threemagwSetupRaw()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
1
<?php
2
/**
3
 * Session extending to add possibility to skip IP address verification.
4
 *
5
 * @package ThreemaGateway
6
 * @author rugk
7
 * @copyright Copyright (c) 2016 rugk
8
 * @license MIT
9
 */
10
11
12
class ThreemaGateway_Session extends XFCP_ThreemaGateway_Session
13
{
14
    /**
15
     * Exposes the protected method _setup publicly, so everyone can use it.
16
     *
17
     * To skip IP address validation now one just have to use $ipAddress = false.
18
     *
19
     * @param string       $sessionId      Session ID to look up, if one exists
20
     * @param string|false $ipAddress      IP address in binary format or false, for access limiting.
21
     * @param array|null   $defaultSession If no session can be found, uses this as the default session value
22
     */
23
    public function threemagwSetupRaw($sessionId = '', $ipAddress = false, array $defaultSession = null)
24
    {
25
        return $this->_setup($sessionId, $ipAddress, $defaultSession);
26
    }
27
}
28