OpenSky/Response/States.pm

filter: Statementstmt 100% 20 / 20 Branchbran 50.0% 4 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 87.5% 28 / 32 CC 5 SCAR 9.4
CC
5
Cov
86%
_empty_response
3.1
_create_response_objects
3.1
BEGIN
1.0
CRAP 2.6
« OpenSky/Response/Flights.pm ↑ Summary OpenSky/Types.pm »
1 package WebService::OpenSky::Response::States;
2  
3 # ABSTRACT: A class representing a states response from the OpenSky Network API
4 8 ▶use WebService::OpenSky::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use WebService::OpenSky::Core::StateVector;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 extends 'WebService::OpenSky::Response';
7  
8 8 our $VERSION = '0.5';
9  
10 2 ▶method _create_response_objects() {
Subroutine _create_response_objects: called CC=3 SCAR=11.2
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for method _create_response_objects (expected 1, got ' . @_ . ')') 0 2 2
@_ > 1 and Function::Parameters::_croak('Too many arguments for method _create_response_objects (expected 1, got ' . @_ . ')') 0 2 2
11 2 return [ map { WebService::OpenSky::Core::StateVector->new($_) } $self->raw_response->{states}->@* ];
12 8 }
13  
14 1 ▶method _empty_response() {
Subroutine _empty_response: called CC=3 SCAR=11.3
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for method _empty_response (expected 1, got ' . @_ . ')') 0 1 1
@_ > 1 and Function::Parameters::_croak('Too many arguments for method _empty_response (expected 1, got ' . @_ . ')') 0 1 1
15 return {
16 1 time => 0,
17 states => [],
18 };
19 }
20  
21 __END__
« OpenSky/Response/Flights.pm ↑ Summary OpenSky/Types.pm »