lib/DBIx/ActiveRecord/Arel/Order.pm

filter: Statementstmt 76.4% 13 / 17 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 3 totaltotal 65.5% 19 / 29 CC 3 SCAR 10.0
CC
3
Cov
71%
reverse
6.0
build
2.0
BEGIN
1.0
CRAP 2.7
« lib/DBIx/ActiveRecord/Arel/Where.pm ↑ Summary lib/DBIx/ActiveRecord/Arel/Query/Count.pm »
1 package DBIx::ActiveRecord::Arel::Order;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 7 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
6 7 my ($self, $type, $column) = @_;
7 7 bless {type => $type, column => $column}, $self;
8 }
9  
10 5 ▶sub build {
Subroutine build: called CC=2 SCAR=6.9
Pod undocumented
11 5 my $self = shift;
12 5 my $t = $self->{type};
13 5 ▶ $t = " $t" if $t;
Branch: 1 branch
BranchTrueFalseTotal
if $t 3 2 5
14 5 $self->{column}->name.$t;
15 }
16  
17 0 ▶sub reverse {
Subroutine reverse: not called CC=2 SCAR=17.9
Pod undocumented
18 0 my $self = shift;
19 0 ▶ if ($self->{type} eq 'DESC') {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'type'} eq 'DESC') { } 0 0 0
20 0 $self->{type} = "";
21 } else {
22 0 $self->{type} = "DESC";
23 }
24 }
25  
26 2 1;
« lib/DBIx/ActiveRecord/Arel/Where.pm ↑ Summary lib/DBIx/ActiveRecord/Arel/Query/Count.pm »