line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::Contact; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
724
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
46
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
37
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
727
|
use Data::Fake::Dates; |
|
2
|
|
|
|
|
15446
|
|
|
2
|
|
|
|
|
120
|
|
7
|
2
|
|
|
2
|
|
649
|
use JMAP::Validation::Generators::Address; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
48
|
|
8
|
2
|
|
|
2
|
|
722
|
use JMAP::Validation::Generators::ContactInformation; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
45
|
|
9
|
2
|
|
|
2
|
|
663
|
use JMAP::Validation::Generators::File; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
41
|
|
10
|
2
|
|
|
2
|
|
8
|
use JMAP::Validation::Generators::String; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
24
|
|
11
|
2
|
|
|
2
|
|
6
|
use JSON::PP; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
84
|
|
12
|
2
|
|
|
2
|
|
6
|
use JSON::Typist; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
447
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub generate { |
15
|
2
|
|
|
2
|
0
|
104
|
my ($type) = @_; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
8
|
my @avatars = ( |
18
|
|
|
|
|
|
|
JMAP::Validation::Generators::File::generate(), |
19
|
|
|
|
|
|
|
undef, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my %ContactInformation |
23
|
2
|
|
|
|
|
5
|
= map { $_ => [JMAP::Validation::Generators::ContactInformation::generate($_)] } |
|
6
|
|
|
|
|
15
|
|
24
|
|
|
|
|
|
|
qw{emails phones online}; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
11
|
my @addresses = ( |
27
|
|
|
|
|
|
|
[JMAP::Validation::Generators::Address::generate()], |
28
|
|
|
|
|
|
|
[], |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
2
|
|
|
|
|
4
|
my @Contacts; |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
5
|
foreach my $isFlagged (JSON::PP::true, JSON::PP::false) { |
34
|
4
|
|
|
|
|
109
|
foreach my $avatar (@avatars) { |
35
|
36
|
|
|
|
|
1440
|
foreach my $email (@{$ContactInformation{emails}}) { |
|
36
|
|
|
|
|
98
|
|
36
|
432
|
|
|
|
|
17592
|
foreach my $phone (@{$ContactInformation{phones}}) { |
|
432
|
|
|
|
|
1253
|
|
37
|
10368
|
|
|
|
|
430406
|
foreach my $online (@{$ContactInformation{online}}) { |
|
10368
|
|
|
|
|
19144
|
|
38
|
124416
|
|
|
|
|
4849878
|
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
|
|
|
|
|
5566212
|
addresses => $address, |
57
|
|
|
|
|
|
|
notes => JMAP::Validation::Generators::String->generate(), |
58
|
|
|
|
|
|
|
}; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
2
|
|
|
|
|
73303
|
return @Contacts; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |