line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Tests::File; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
12
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
81
|
|
4
|
4
|
|
|
4
|
|
9
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
63
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
10
|
use JMAP::Validation::Tests::Number; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
48
|
|
7
|
4
|
|
|
4
|
|
11
|
use JMAP::Validation::Tests::Object; |
|
4
|
|
|
|
|
1
|
|
|
4
|
|
|
|
|
46
|
|
8
|
4
|
|
|
4
|
|
9
|
use JMAP::Validation::Tests::String; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
384
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub is_File { |
11
|
221184
|
|
|
221184
|
0
|
162190
|
my ($value) = @_; |
12
|
|
|
|
|
|
|
|
13
|
221184
|
50
|
|
|
|
289665
|
return unless JMAP::Validation::Tests::Object::is_object($value); |
14
|
221184
|
50
|
|
|
|
336522
|
return unless JMAP::Validation::Tests::String::is_id($value->{blobId}); |
15
|
|
|
|
|
|
|
|
16
|
221184
|
|
|
|
|
983599
|
foreach my $field (qw{type name}) { |
17
|
442368
|
100
|
|
|
|
650571
|
if (defined $value->{$field}) { |
18
|
221184
|
50
|
|
|
|
294952
|
return unless JMAP::Validation::Tests::String::is_string($value->{$field}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
221184
|
50
|
|
|
|
321102
|
if (defined $value->{number}) { |
23
|
0
|
0
|
|
|
|
0
|
return unless JMAP::Validation::Tests::Number::is_number($value->{number}); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
221184
|
|
|
|
|
394970
|
return 1; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |