line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::Contact; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
692
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
44
|
|
4
|
2
|
|
|
2
|
|
5
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
35
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
688
|
use Data::Fake::Dates; |
|
2
|
|
|
|
|
14417
|
|
|
2
|
|
|
|
|
97
|
|
7
|
2
|
|
|
2
|
|
584
|
use JMAP::Validation::Generators::Address; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
44
|
|
8
|
2
|
|
|
2
|
|
633
|
use JMAP::Validation::Generators::ContactInformation; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
42
|
|
9
|
2
|
|
|
2
|
|
583
|
use JMAP::Validation::Generators::File; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
44
|
|
10
|
2
|
|
|
2
|
|
8
|
use JMAP::Validation::Generators::String; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
23
|
|
11
|
2
|
|
|
2
|
|
6
|
use JSON::PP; |
|
2
|
|
|
|
|
1
|
|
|
2
|
|
|
|
|
80
|
|
12
|
2
|
|
|
2
|
|
6
|
use JSON::Typist; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
428
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub generate { |
15
|
2
|
|
|
2
|
0
|
96
|
my ($type) = @_; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
8
|
my @avatars = ( |
18
|
|
|
|
|
|
|
JMAP::Validation::Generators::File::generate(), |
19
|
|
|
|
|
|
|
undef, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my %ContactInformation |
23
|
2
|
|
|
|
|
6
|
= map { $_ => [JMAP::Validation::Generators::ContactInformation::generate($_)] } |
|
6
|
|
|
|
|
12
|
|
24
|
|
|
|
|
|
|
qw{emails phones online}; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
7
|
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
|
|
|
|
|
86
|
foreach my $avatar (@avatars) { |
35
|
36
|
|
|
|
|
1354
|
foreach my $email (@{$ContactInformation{emails}}) { |
|
36
|
|
|
|
|
81
|
|
36
|
432
|
|
|
|
|
16794
|
foreach my $phone (@{$ContactInformation{phones}}) { |
|
432
|
|
|
|
|
1022
|
|
37
|
10368
|
|
|
|
|
410122
|
foreach my $online (@{$ContactInformation{online}}) { |
|
10368
|
|
|
|
|
17118
|
|
38
|
124416
|
|
|
|
|
4669967
|
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
|
|
|
|
|
5369538
|
addresses => $address, |
57
|
|
|
|
|
|
|
notes => JMAP::Validation::Generators::String->generate(), |
58
|
|
|
|
|
|
|
}; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
2
|
|
|
|
|
79722
|
return @Contacts; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |