OpenSky/Response/Flights.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/FlightTrack.pm ↑ Summary OpenSky/Response/States.pm »
1 package WebService::OpenSky::Response::Flights;
2  
3 # ABSTRACT: A class representing a flights response from the OpenSky Network API
4  
5 8 ▶use WebService::OpenSky::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 ▶use WebService::OpenSky::Core::Flight;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 8 extends 'WebService::OpenSky::Response';
8  
9 8 our $VERSION = '0.5';
10  
11 8 ▶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 8 8
@_ > 1 and Function::Parameters::_croak('Too many arguments for method _create_response_objects (expected 1, got ' . @_ . ')') 0 8 8
12 8 return [ map { WebService::OpenSky::Core::Flight->new($_) } $self->raw_response->@* ];
13 8 }
14  
15 4 ▶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 4 4
@_ > 1 and Function::Parameters::_croak('Too many arguments for method _empty_response (expected 1, got ' . @_ . ')') 0 4 4
16 4 return [];
17 }
18  
19 __END__
« OpenSky/Response/FlightTrack.pm ↑ Summary OpenSky/Response/States.pm »