line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::Contact; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
692
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
46
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
36
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
708
|
use Data::Fake::Dates; |
|
2
|
|
|
|
|
15180
|
|
|
2
|
|
|
|
|
110
|
|
7
|
2
|
|
|
2
|
|
628
|
use JMAP::Validation::Generators::Address; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
46
|
|
8
|
2
|
|
|
2
|
|
658
|
use JMAP::Validation::Generators::ContactInformation; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
43
|
|
9
|
2
|
|
|
2
|
|
581
|
use JMAP::Validation::Generators::File; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
39
|
|
10
|
2
|
|
|
2
|
|
8
|
use JMAP::Validation::Generators::String; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
24
|
|
11
|
2
|
|
|
2
|
|
5
|
use JSON::PP; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
80
|
|
12
|
2
|
|
|
2
|
|
6
|
use JSON::Typist; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
430
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub generate { |
15
|
2
|
|
|
2
|
0
|
99
|
my ($type) = @_; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
9
|
my @avatars = ( |
18
|
|
|
|
|
|
|
JMAP::Validation::Generators::File::generate(), |
19
|
|
|
|
|
|
|
undef, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my %ContactInformation |
23
|
2
|
|
|
|
|
7
|
= map { $_ => [JMAP::Validation::Generators::ContactInformation::generate($_)] } |
|
6
|
|
|
|
|
14
|
|
24
|
|
|
|
|
|
|
qw{emails phones online}; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
9
|
my @addresses = ( |
27
|
|
|
|
|
|
|
[JMAP::Validation::Generators::Address::generate()], |
28
|
|
|
|
|
|
|
[], |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
2
|
|
|
|
|
4
|
my @Contacts; |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
6
|
foreach my $isFlagged (JSON::PP::true, JSON::PP::false) { |
34
|
4
|
|
|
|
|
96
|
foreach my $avatar (@avatars) { |
35
|
36
|
|
|
|
|
1424
|
foreach my $email (@{$ContactInformation{emails}}) { |
|
36
|
|
|
|
|
109
|
|
36
|
432
|
|
|
|
|
17683
|
foreach my $phone (@{$ContactInformation{phones}}) { |
|
432
|
|
|
|
|
1124
|
|
37
|
10368
|
|
|
|
|
433431
|
foreach my $online (@{$ContactInformation{online}}) { |
|
10368
|
|
|
|
|
20088
|
|
38
|
124416
|
|
|
|
|
4884584
|
foreach my $address (@addresses) { |
39
|
|
|
|
|
|
|
push @Contacts, { |
40
|
|
|
|
|
|
|
id => JMAP::Validation::Generators::String->generate(), |
41
|
|
|
|
|
|
|
isFlagged => $isFlagged, |
42
|
|
|
|
|
|
|
avatar => $avatar, |
43
|
|
|
|
|
|
|
prefix => JMAP::Validation::Generators::String->generate(), |
44
|
|
|
|
|
|
|
firstName => JMAP::Validation::Generators::String->generate(), |
45
|
|
|
|
|
|
|
lastName => JMAP::Validation::Generators::String->generate(), |
46
|
|
|
|
|
|
|
suffix => JMAP::Validation::Generators::String->generate(), |
47
|
|
|
|
|
|
|
nickname => JMAP::Validation::Generators::String->generate(), |
48
|
|
|
|
|
|
|
birthday => JSON::Typist::String->new(fake_past_datetime('%Y-%m-%d')->()), |
49
|
|
|
|
|
|
|
anniversary => JSON::Typist::String->new(fake_past_datetime('%Y-%m-%d')->()), |
50
|
|
|
|
|
|
|
company => JMAP::Validation::Generators::String->generate(), |
51
|
|
|
|
|
|
|
department => JMAP::Validation::Generators::String->generate(), |
52
|
|
|
|
|
|
|
jobTitle => JMAP::Validation::Generators::String->generate(), |
53
|
|
|
|
|
|
|
emails => $ContactInformation{emails}, |
54
|
|
|
|
|
|
|
phones => $ContactInformation{phones}, |
55
|
|
|
|
|
|
|
online => $ContactInformation{online}, |
56
|
248832
|
|
|
|
|
5618992
|
addresses => $address, |
57
|
|
|
|
|
|
|
notes => JMAP::Validation::Generators::String->generate(), |
58
|
|
|
|
|
|
|
}; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
2
|
|
|
|
|
71475
|
return @Contacts; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |