line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Tests::ContactInformation; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
63
|
use strict; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
109
|
|
4
|
5
|
|
|
5
|
|
15
|
use warnings; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
91
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
1467
|
use JMAP::Validation::Tests::Boolean; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
107
|
|
7
|
5
|
|
|
5
|
|
1425
|
use JMAP::Validation::Tests::Object; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
162
|
|
8
|
5
|
|
|
5
|
|
340
|
use JMAP::Validation::Tests::String; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
1779
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub is_ContactInformation { |
11
|
17915952
|
|
|
17915952
|
0
|
10695760
|
my ($value) = @_; |
12
|
|
|
|
|
|
|
|
13
|
17915952
|
50
|
|
|
|
21281017
|
return unless JMAP::Validation::Tests::Object::is_object($value); |
14
|
|
|
|
|
|
|
|
15
|
17915952
|
50
|
|
|
|
26486840
|
return unless JMAP::Validation::Tests::String::is_string($value->{type}); |
16
|
17915952
|
50
|
|
|
|
43469942
|
return unless $value->{type} =~ qr{fax|home|mobile|other|pager|personal|uri|username|work}; |
17
|
|
|
|
|
|
|
|
18
|
17915952
|
100
|
|
|
|
84019499
|
if (defined $value->{label}) { |
19
|
8957976
|
50
|
|
|
|
11881569
|
return unless JMAP::Validation::Tests::String::is_string($value->{label}); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
17915952
|
50
|
|
|
|
24012437
|
return unless JMAP::Validation::Tests::String::is_string($value->{value}); |
23
|
17915952
|
50
|
|
|
|
25741731
|
return unless JMAP::Validation::Tests::Boolean::is_boolean($value->{isDefault}); |
24
|
|
|
|
|
|
|
|
25
|
17915952
|
|
|
|
|
22737103
|
return 1; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub is_ContactInformation_email { |
29
|
4478988
|
|
|
4478988
|
0
|
3123376
|
my ($value) = @_; |
30
|
|
|
|
|
|
|
|
31
|
4478988
|
50
|
|
|
|
3957503
|
return unless is_ContactInformation($value); |
32
|
4478988
|
50
|
|
|
|
10745854
|
return unless $value->{type} =~ qr{personal|work|other}; |
33
|
|
|
|
|
|
|
|
34
|
4478988
|
|
|
|
|
23471480
|
return 1; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub is_ContactInformation_phone { |
38
|
8957976
|
|
|
8957976
|
0
|
6089122
|
my ($value) = @_; |
39
|
|
|
|
|
|
|
|
40
|
8957976
|
50
|
|
|
|
7666286
|
return unless is_ContactInformation($value); |
41
|
8957976
|
50
|
|
|
|
20924170
|
return unless $value->{type} =~ qr{home|work|mobile|fax|pager|other}; |
42
|
|
|
|
|
|
|
|
43
|
8957976
|
|
|
|
|
45842638
|
return 1; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub is_ContactInformation_online { |
47
|
4478988
|
|
|
4478988
|
0
|
3148585
|
my ($value) = @_; |
48
|
|
|
|
|
|
|
|
49
|
4478988
|
50
|
|
|
|
3921734
|
return unless is_ContactInformation($value); |
50
|
4478988
|
50
|
|
|
|
10600534
|
return unless $value->{type} =~ qr{uri|username|other}; |
51
|
|
|
|
|
|
|
|
52
|
4478988
|
|
|
|
|
23331378
|
return 1; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |