SDK/Storage/Queues/QueueProperties.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 4 / 4 Conditioncond 75.0% 6 / 8 MC/DCmcdc 50.0% 2 / 4 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 90.4% 38 / 42 CC 6 SCAR 13.9
CC
6
Cov
94%
__ANON__
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 4.0
« SDK/Core/Pager.pm ↑ Summary SDK/Storage/Tables/TableItem.pm »
1 3 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 3 ▶use feature 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶no warnings 'experimental::class';
Subroutine BEGIN: called CC=1 SCAR=0.0
4
5 3 class Azure::SDK::Storage::Queues::QueueProperties {
6 3 ▶ use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 3 field $approximate_message_count :param :reader;
9 3 field $metadata :param :reader = undef;
10
11 10 ▶ ADJUST {
Subroutine __ANON__: called CC=6 SCAR=18.0
12 10 ▶ croak 'Queue properties require a non-negative approximate message count'
Branch: 1 branch
BranchTrueFalseTotal
unless defined $approximate_message_count and not ref $approximate_message_count and $approximate_message_count =~ /\A[0-9]+\z/u 7 3 10
Condition83%5/6
defined $approximate_message_count and not ref $approximate_message_count and $approximate_message_count =~ /\A[0-9]+\z/u
!ll&&!rl&&r
253
defined $approximate_message_count and not ref $approximate_message_count
!ll&&!rl&&r
208
MC/DC66%2/3
defined $approximate_message_count and not ref $approximate_message_count and $approximate_message_count =~ /\A[0-9]+\z/u
defined $approximate_message_count not ref $approximate_message_count $approximate_message_count =~ /\A[0-9]+\z/u
Truth table75%3/4
A and not(B) and C
A= defined $approximate_message_countB= not ref $approximate_message_countC= $approximate_message_count =~ /\A[0-9]+\z/u
ABCresult
0XX0
10X0
1100
1111
13 unless defined $approximate_message_count
14 && !ref $approximate_message_count
15 && $approximate_message_count =~ /\A[0-9]+\z/;
16 3 $approximate_message_count = 0 + $approximate_message_count;
17
18 3 ▶ $metadata //= {};
Condition50%1/2
$metadata //= {}
l!l
30
MC/DC0%0/1
$metadata //= {}
$metadata
Truth table50%1/2
A
A= $metadata
Aresult
11
00
19 3 ▶ croak 'Queue properties metadata must be a hash reference'
Branch: 1 branch
BranchTrueFalseTotal
unless ref $metadata eq "HASH" 1 2 3
20 unless ref $metadata eq 'HASH';
21 2 $metadata = { %{$metadata} };
22 }
23 }
24
25 3 1;
26
27 __END__
« SDK/Core/Pager.pm ↑ Summary SDK/Storage/Tables/TableItem.pm »