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) { }
960 0 2 @_ == 1 ? :
963 0 2 unless my $type = $args{'msgtype'} = delete $args{'type'}
965 0 2 unless $MSG_REQUIRED_FIELDS{$type}
969 0 2 unless $args{$_}
972 1 1 if (defined(my $txn_id = $args{'txn_id'})) { }
1005 0 0 if $from eq 'START'
1025 0 0 unless my($subtype) = $event->{'type'} =~ /^m\.room\.(.*)$/
1028 0 0 if (my $code = $self->can("_handle_roomevent_${subtype}_backward")) { }
1056 0 1 if $self->{'typing_timer'}
1089 0 1 unless my $f = $self->{'typing_timer'}
1116 0 1 unless my $event_id = $args{'event_id'}
1144 0 1 unless my $member = $self->member($user_id)
1156 0 0 unless my $member = $self->{'back_members_by_userid'}{$user_id}
1166 0 0 unless my $member = $self->member($user->user_id)
1184 0 0 if $typing->{$user_id}
1187 0 0 unless my $member = $self->member($user_id)
1192 0 0 unless my $member = $self->member($user_id)
1209 0 1 unless my $read_receipt = $receipt->{'m.read'}
1213 0 1 unless my $member = $self->member($user_id)