Yamaantaka/_Mirror.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 4 totaltotal 77.4% 24 / 31 CC 2 SCAR 3.0
CC
2
Cov
95%
fixBoxDirectionPart
2.0
BEGIN
1.0
fixCursorPositions
1.0
CRAP 1.3
« Yamaantaka/RotateR.pm ↑ Summary Yamaantaka/_NoReverseGD.pm »
1 #-*- perl -*-
2 #-*- coding: us-ascii -*-
3  
4 package CSS::Yamaantaka::_Mirror;
5  
6 34 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 #use warnings;
8  
9 129 ▶sub fixBoxDirectionPart {
Subroutine fixBoxDirectionPart: called CC=2 SCAR=7.1
Pod undocumented
10 129 my $direction = $_[1];
11 return {
12 'right' => 'left',
13 'left' => 'right',
14 129 ▶ }->{$direction} ||
Condition66%2/3
{'right', 'left', 'left', 'right'}->{$direction} || $direction
l!l&&r!l&&!r
78510
MC/DC0%0/2
{'right', 'left', 'left', 'right'}->{$direction} || $direction
{'right', 'left', 'left', 'right'}->{$direction} $direction
Truth table66%2/3
A || B
A= {'right', 'left', 'left', 'right'}->{$direction}B= $direction
ABresult
1X1
011
000
15 $direction;
16 }
17  
18 16 ▶sub fixCursorPositions {
Subroutine fixCursorPositions: called CC=1 SCAR=0.0
Pod undocumented
19 16 my $direction = $_[1];
20 16 $direction =~ tr/ew/we/;
21 16 return $direction;
22 }
23  
24 33 ▶sub reorderFourPartNotation {
Subroutine reorderFourPartNotation: called CC=1 SCAR=0.0
Pod undocumented
25 33 shift;
26 33 my @part = @_;
27 33 @part = @part[0, 3, 2, 1];
28 33 return @part;
29 }
30  
31 26 ▶sub reorderBorderRadiusSubparts {
Subroutine reorderBorderRadiusSubparts: called CC=1 SCAR=0.0
Pod undocumented
32 26 shift;
33 26 my @part = @_;
34 26 @part = @part[1, 0, 3, 2];
35 26 return @part;
36 }
37  
38 34 1;
« Yamaantaka/RotateR.pm ↑ Summary Yamaantaka/_NoReverseGD.pm »