Branch Coverage

blib/lib/Net/Async/Matrix/Room.pm
Criterion Covered Total %
branch 37 100 37.0


line true false branch
154 4 106 if exists $params{$_}
172 3 5 if not defined $old || defined $new or defined $old and defined $new and $old eq $new
187 0 1 unless (exists $newhash->{$_})
188 0 0 if defined $old
194 1 0 unless not defined $old || defined $new or defined $old and defined $new and $old eq $new
200 1 0 if exists $oldhash->{$_}
202 0 0 if defined $new
205 1 0 keys %changes ? :
269 5 2 if ($sync->{'state'} and $sync->{'state'}{'events'} and @{$sync->{'state'}{'events'};})
276 7 1 if (defined $event->{'state_key'}) { }
290 7 9 if ($initial)
347 7 0 $1 ? :
349 4 3 if ($method and my $code = $self->can($method)) { }
364 0 2 unless $event->{'type'} =~ /^(m\.room\.)?(.*)$/
366 1 1 $1 ? :
369 2 0 if (my $code = $self->can($method)) { }
598 0 0 unless my $levels = $event->{$k}
605 0 0 if ($phase eq 'initial') { }
0 0 elsif ($phase eq 'forward') { }
0 0 elsif ($phase eq 'backward') { }
619 0 0 if not defined $oldlevels->{$_} or $oldlevels->{$_} != $newlevels->{$_}
634 0 0 if not defined $oldlevels->{$_} or $oldlevels->{$_} != $newlevels->{$_}
666 0 0 if $self->{'levels'}{$_} == $levels{$_}
673 0 0 if exists $levels{$_}
678 0 0 if exists $levels{$_}
682 0 0 if ($events{'ops_levels'})
719 4 0 unless ($changes{'membership'}[$idx] // '') eq 'leave'
726 0 2 unless my $target_member = $state->member($user_id)
791 1 0 if (my $users = $changes{'users'})
796 0 1 unless my $target = $state->member($user_id)
847 0 0 if (defined $value) { }
941 0 2 @_ == 1 ? :
944 0 2 unless my $type = $args{'msgtype'} = delete $args{'type'}
946 0 2 unless $MSG_REQUIRED_FIELDS{$type}
950 0 2 unless $args{$_}
953 1 1 if (defined(my $txn_id = $args{'txn_id'})) { }
986 0 0 if $from eq 'START'
1006 0 0 unless my($subtype) = $event->{'type'} =~ /^m\.room\.(.*)$/
1009 0 0 if (my $code = $self->can("_handle_roomevent_${subtype}_backward")) { }
1037 0 1 if $self->{'typing_timer'}
1070 0 1 unless my $f = $self->{'typing_timer'}
1097 0 1 unless my $event_id = $args{'event_id'}
1125 0 1 unless my $member = $self->member($user_id)
1137 0 0 unless my $member = $self->{'back_members_by_userid'}{$user_id}
1147 0 0 unless my $member = $self->member($user->user_id)
1165 0 0 if $typing->{$user_id}
1168 0 0 unless my $member = $self->member($user_id)
1173 0 0 unless my $member = $self->member($user_id)
1190 0 1 unless my $read_receipt = $receipt->{'m.read'}
1194 0 1 unless my $member = $self->member($user_id)