Passed
Push — master ( 463105...84cd59 )
by Roberto
04:47
created

SoapException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 15
ccs 0
cts 11
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A unableToLoadCurl() 0 5 1
A soapFault() 0 6 1
1
<?php
2
3
namespace NFePHP\Common\Exception;
4
5
/**
6
 * @category   NFePHP
7
 * @package    NFePHP\Common\Exception
8
 * @copyright  Copyright (c) 2008-2017
9
 * @license    http://www.gnu.org/licenses/lesser.html LGPL v3
10
 * @author     Roberto L. Machado <linux.rlm at gmail dot com>
11
 * @link       http://github.com/nfephp-org/sped-common for the canonical source repository
12
 */
13
14
class SoapException extends \RuntimeException implements ExceptionInterface
15
{
16
    public static function unableToLoadCurl()
17
    {
18
        return new static('Unable to load cURL, '
19
            . 'verify if libcurl is installed.');
20
    }
21
22
    public static function soapFault($message)
23
    {
24
        return new static(
25
            'An error occurred while trying to communication via soap, '
26
            . $message);
27
    }
28
}
29