Sisimai/Reason/Vacation.pm

filter: Statementstmt 100% 21 / 21 Branchbran 50.0% 1 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 8 / 8 Podpod 50.0% 2 / 4 totaltotal 92.1% 35 / 38 CC 3 SCAR 4.7
CC
3
Cov
96%
match
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.6
« Sisimai/Reason/SystemError.pm ↑ Summary Sisimai/Reason/MailerError.pm »
1 package Sisimai::Reason::Vacation;
2 13 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use Sisimai::Eb;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶sub text { $Sisimai::Eb::ReAWAY }
Subroutine text: called CC=1 SCAR=0.0
Pod documented
8 6 ▶sub description { 'Email replied automatically due to a recipient is out of office' }
Subroutine description: called CC=1 SCAR=0.0
Pod undocumented
9 43 ▶sub match {
Subroutine match: called CC=3 SCAR=11.0
Pod documented
10 # Try to match that the given text and regular expressions
11 # @param [String] argv1 String to be matched with regular expressions
12 # @return [Integer] 0: Did not match
13 # 1: Matched
14 # @since v4.22.3
15 43 my $class = shift;
16 43 ▶ my $argv1 = shift // return 0;
Condition100%2/2
shift() // (return 0)
l!l
421
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
Aresult
11
00
17  
18 42 state $index = [
19 'i am away on vacation',
20 'i am away until',
21 'i am out of the office',
22 'i will be traveling for work on',
23 ];
24 42 ▶ return 1 if grep { rindex($argv1, $_) > -1 } @$index;
Branch: 1 branch
BranchTrueFalseTotal
if grep {rindex($argv1, $_) != -1;} @$index 0 42 42
25 42 return 0;
26 }
27 1 ▶sub true { return 0 }
Subroutine true: called CC=1 SCAR=0.0
Pod undocumented
28 13 1;
29  
30 __END__
« Sisimai/Reason/SystemError.pm ↑ Summary Sisimai/Reason/MailerError.pm »