Completed
Push — master ( 76cf21...f8444d )
by Jeroen
01:30
created

VCardException::invalidImage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace JeroenDesloovere\VCard;
4
5
/*
6
 * This file is part of the VCard PHP Class from Jeroen Desloovere.
7
 *
8
 * For the full copyright and license information, please view the license
9
 * file that was distributed with this source code.
10
 */
11
12
/**
13
 * VCard Exception PHP Class.
14
 *
15
 * @author Jeroen Desloovere <[email protected]>
16
 */
17
class VCardException extends \Exception
18
{
19
    public static function elementAlreadyExists($element)
20
    {
21
        return new self('You can only set "' . $element . '" once.');
22
    }
23
24
    public static function emptyURL()
25
    {
26
        return new self('Nothing returned from URL.');
27
    }
28
29
    public static function invalidImage()
30
    {
31
        return new self('Returned data is not an image.');
32
    }
33
34
    public static function outputDirectoryNotExists()
35
    {
36
        return new self('Output directory does not exist.');
37
    }
38
}
39