lib/Finance/Tax/Aruba/Income/2021.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 25 / 25 CC 3 SCAR 6.9
CC
3
Cov
100%
is_year
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« script/bbo.pl ↑ Summary lib/Finance/Tax/Aruba/Income/2023.pm »
1 package Finance::Tax::Aruba::Income::2021;
2 8 our $VERSION = '0.014';
3 8 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # ABSTRACT: Income tax calculator for the year 2021
7  
8 8 with qw(
9 Finance::Tax::Aruba::Role::Income::TaxYear
10 );
11  
12 8 has '+taxfree_max' => (
13 default => 28_861,
14 );
15  
16 12 ▶sub _build_tax_bracket {
Subroutine _build_tax_bracket: called CC=1 SCAR=0.0
17 return [
18 12 { min => 0, max => 34930, fixed => 0, rate => 12 },
19 {
20 min => 34930,
21 max => 65904,
22 fixed => 4191.60,
23 rate => 23
24 },
25 {
26 min => 65904,
27 max => 147454,
28 fixed => 11315.62,
29 rate => 42
30 },
31 {
32 min => 147454,
33 max => 'inf' * 1,
34 fixed => 45566.62,
35 rate => 52
36 },
37 ];
38 }
39  
40 58 ▶sub is_year {
Subroutine is_year: called CC=3 SCAR=11.0
Pod documented
41 58 my $self = shift;
42 58 my $year = shift;
43 58 ▶ return 1 if $year == 2021;
Branch: 1 branch
BranchTrueFalseTotal
if $year == 2021 8 50 58
44 50 ▶ return 1 if $year == 2022; # same rules apply
Branch: 1 branch
BranchTrueFalseTotal
if $year == 2022 4 46 50
45 46 return 0;
46 }
47  
48  
49 8 __PACKAGE__->meta->make_immutable;
50  
51 __END__
« script/bbo.pl ↑ Summary lib/Finance/Tax/Aruba/Income/2023.pm »