File Coverage

lib/BalanceOfPower/Commands/LowerDisorder.pm
Criterion Covered Total %
statement 11 11 100.0
branch 2 2 100.0
condition 2 3 66.6
subroutine 3 3 100.0
pod 0 1 0.0
total 18 20 90.0


line stmt bran cond sub pod time code
1             package BalanceOfPower::Commands::LowerDisorder;
2             $BalanceOfPower::Commands::LowerDisorder::VERSION = '0.400110';
3 13     13   43 use Moo;
  13         14  
  13         53  
4              
5 13     13   2375 use BalanceOfPower::Constants ":all";
  13         16  
  13         6359  
6              
7             extends 'BalanceOfPower::Commands::NoArgs';
8              
9             sub IA
10             {
11 18     18 0 17 my $self = shift;
12 18         34 my $nation = $self->get_nation();
13 18 100 66     69 if($nation->internal_disorder > WORRYING_LIMIT && $nation->production_for_domestic > DOMESTIC_BUDGET)
14             {
15 1         2 return "LOWER DISORDER";
16             }
17             else
18             {
19 17         27 return undef;
20             }
21             }
22              
23             1;