line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Tests::File; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
11
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
83
|
|
4
|
4
|
|
|
4
|
|
10
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
66
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
11
|
use JMAP::Validation::Tests::Number; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
52
|
|
7
|
4
|
|
|
4
|
|
10
|
use JMAP::Validation::Tests::Object; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
59
|
|
8
|
4
|
|
|
4
|
|
10
|
use JMAP::Validation::Tests::String; |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
418
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub is_File { |
11
|
221184
|
|
|
221184
|
0
|
163046
|
my ($value) = @_; |
12
|
|
|
|
|
|
|
|
13
|
221184
|
50
|
|
|
|
286259
|
return unless JMAP::Validation::Tests::Object::is_object($value); |
14
|
221184
|
50
|
|
|
|
349334
|
return unless JMAP::Validation::Tests::String::is_id($value->{blobId}); |
15
|
|
|
|
|
|
|
|
16
|
221184
|
|
|
|
|
1001938
|
foreach my $field (qw{type name}) { |
17
|
442368
|
100
|
|
|
|
668817
|
if (defined $value->{$field}) { |
18
|
221184
|
50
|
|
|
|
295535
|
return unless JMAP::Validation::Tests::String::is_string($value->{$field}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
221184
|
50
|
|
|
|
298608
|
if (defined $value->{number}) { |
23
|
0
|
0
|
|
|
|
0
|
return unless JMAP::Validation::Tests::Number::is_number($value->{number}); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
221184
|
|
|
|
|
402064
|
return 1; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |