Completed
Push — master ( e7d66f...77a53e )
by Roberto
04:50 queued 02:26
created

SignerException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 12
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A digestComparisonFailed() 0 4 1
A tagNotFound() 0 4 1
1
<?php
2
namespace NFePHP\Common\Exception;
3
4
/**
5
 * @category   NFePHP
6
 * @package    NFePHP\Common\Exception
7
 * @copyright  Copyright (c) 2008-2014
8
 * @license    http://www.gnu.org/licenses/lesser.html LGPL v3
9
 * @author     Roberto L. Machado <linux.rlm at gmail dot com>
10
 * @link       http://github.com/nfephp-org/sped-common for the canonical source repository
11
 */
12
13
class SignerException extends \RuntimeException implements ExceptionInterface
14
{
15 2
    public static function digestComparisonFailed()
16
    {
17 2
        return new static('The XML content does not match the Digest Value.');
18
    }
19
    
20
    public static function tagNotFound($tag)
21
    {
22
        return new static("The specified tag <$tag> was not found in xml.");
23
    }
24
}
25