| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package JMAP::Validation::Generators::SetError; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
881
|
use strict; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
47
|
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
38
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
647
|
use JMAP::Validation::Generators::String; |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
62
|
|
|
7
|
2
|
|
|
2
|
|
11
|
use JSON::Typist; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
243
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my %types = ( |
|
10
|
|
|
|
|
|
|
invalidArguments => { |
|
11
|
|
|
|
|
|
|
description => JMAP::Validation::Generators::String->generate(), |
|
12
|
|
|
|
|
|
|
}, |
|
13
|
|
|
|
|
|
|
invalidProperties => { |
|
14
|
|
|
|
|
|
|
properties => [], |
|
15
|
|
|
|
|
|
|
description => JMAP::Validation::Generators::String->generate(), |
|
16
|
|
|
|
|
|
|
}, |
|
17
|
|
|
|
|
|
|
( |
|
18
|
|
|
|
|
|
|
map { $_ => undef } |
|
19
|
|
|
|
|
|
|
qw{ |
|
20
|
|
|
|
|
|
|
accountReadOnly |
|
21
|
|
|
|
|
|
|
fromAccountNoMail |
|
22
|
|
|
|
|
|
|
fromAccountNotFound |
|
23
|
|
|
|
|
|
|
invalidMailboxes |
|
24
|
|
|
|
|
|
|
maxQuotaReached |
|
25
|
|
|
|
|
|
|
notFound |
|
26
|
|
|
|
|
|
|
stateMismatch |
|
27
|
|
|
|
|
|
|
toAccountNoMail |
|
28
|
|
|
|
|
|
|
toAccountNotFound |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
), |
|
31
|
|
|
|
|
|
|
); |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub generate { |
|
34
|
8
|
|
|
8
|
0
|
497
|
my (@types) = @_; |
|
35
|
|
|
|
|
|
|
|
|
36
|
8
|
|
|
|
|
8
|
my @SetErrors; |
|
37
|
|
|
|
|
|
|
|
|
38
|
8
|
50
|
|
|
|
21
|
foreach my $type (@types ? @types : (keys %types)) { |
|
39
|
|
|
|
|
|
|
push @SetErrors, { |
|
40
|
|
|
|
|
|
|
type => JSON::Typist::String->new($type), |
|
41
|
8
|
100
|
|
|
|
21
|
($types{$type} ? (%{$types{$type}}) : ()), |
|
|
4
|
|
|
|
|
38
|
|
|
42
|
|
|
|
|
|
|
}; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
8
|
|
|
|
|
71
|
return \@SetErrors; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |