|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package JSV::Keyword::Draft4::MaxItems;  | 
| 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
3
 | 
44
 | 
 
 | 
 
 | 
  
44
  
 | 
 
 | 
122644
 | 
 use strict;  | 
| 
 
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1482
 | 
    | 
| 
 
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1075
 | 
    | 
| 
4
 | 
44
 | 
 
 | 
 
 | 
  
44
  
 | 
 
 | 
188
 | 
 use warnings;  | 
| 
 
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
70
 | 
    | 
| 
 
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1203
 | 
    | 
| 
5
 | 
44
 | 
 
 | 
 
 | 
  
44
  
 | 
 
 | 
41931
 | 
 use parent qw(JSV::Keyword);  | 
| 
 
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
16700
 | 
    | 
| 
 
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
243
 | 
    | 
| 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
7
 | 
44
 | 
 
 | 
 
 | 
  
44
  
 | 
 
 | 
3111
 | 
 use JSV::Keyword qw(:constants);  | 
| 
 
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
74
 | 
    | 
| 
 
 | 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
13155
 | 
    | 
| 
8
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub instance_type() { INSTANCE_TYPE_ARRAY(); }  | 
| 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub keyword() { "maxItems" }  | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub keyword_priority() { 10; }  | 
| 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub validate {  | 
| 
14
 | 
22
 | 
 
 | 
 
 | 
  
22
  
 | 
  
0
  
 | 
41
 | 
     my ($class, $context, $schema, $instance) = @_;  | 
| 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
16
 | 
22
 | 
 
 | 
 
 | 
 
 | 
 
 | 
94
 | 
     my $keyword_value = $class->keyword_value($schema);  | 
| 
17
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
18
 | 
22
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
87
 | 
     if (scalar(@$instance) > $keyword_value) {  | 
| 
19
 | 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
27
 | 
         $context->log_error("The instance array length is greater than maxItems value");  | 
| 
20
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
21
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
22
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;  |