Completed
Push — master ( 034d53...fa2497 )
by Márk
26:41 queued 16:42
created

xmlrpcExtensionLibxmlParsehugeNotSupported()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Fxmlrpc\Serialization\Exception;
4
5
use Fxmlrpc\Serialization\Exception;
6
7
/**
8
 * @author Márk Sági-Kazár <[email protected]>
9
 */
10
class ParserException extends \RuntimeException implements Exception
11
{
12
    /**
13
     * Named constructor for invalid XML values.
14
     *
15
     * @param string $string
16
     *
17
     * @return static
18
     */
19
    public static function notXml($string)
20
    {
21
        return new static(sprintf('Invalid XML. Expected XML, string given: "%s"', $string));
22
    }
23
24
    /**
25
     * @return static
26
     */
27
    public static function xmlrpcExtensionLibxmlParsehugeNotSupported()
28
    {
29
        return new static(
30
            'Parsing huge XML responses using libxml’s LIBXML_PARSEHUGE flag is not supported in ext/xmlrpc'
31
        );
32
    }
33
}
34