Passed
Push — master ( 1c7137...b5ef5e )
by Pieter van der
03:26 queued 14s
created

isTemporary()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the tiqr project.
4
 * 
5
 * The tiqr project aims to provide an open implementation for 
6
 * authentication using mobile devices. It was initiated by 
7
 * SURFnet and developed by Egeniq.
8
 *
9
 * More information: http://www.tiqr.org
10
 *
11
 * @author Peter Verhage <[email protected]>
12
 * 
13
 * @package tiqr
14
 *
15
 * @license New BSD License - See LICENSE file for details.
16
 *
17
 * @copyright (C) 2010-2019 SURFnet BV
18
 */
19
20
21
/** @internal includes */
22
require_once('Tiqr/Message/Exception.php');
23
24
/**
25
 * Exception in case of a message that cannot be send.
26
 */
27
class Tiqr_Message_Exception_MismatchSenderId extends Tiqr_Message_Exception
28
{
29
    private $_temporary;
30
    
31
    /**
32
     * Constructor
33
     *
34
     * @param string    $message    exception message
35
     * @param boolean   $temporary  temporary failure?
36
     * @param Exception $parent     parent exception
37
     */
38
    public function __construct($message, $temporary=false, Exception $parent=null)
39
    {
40
        parent::__construct($message, $parent);
41
        $this->_temporary = $temporary;
42
    }
43
    
44
    /**
45
     * Is temporary failure? E.g. it's possible to try again later on?
46
     *
47
     * @return boolean is temporary failure?
48
     */
49
    public function isTemporary()
50
    {
51
        return $this->_temporary;
52
    }
53
}
54