Branch Coverage

lib/Smartcat/Client/ApiClient.pm
Criterion Covered Total %
branch 1 78 1.2


line true false branch
47 0 11 if ($_[0] and ref $_[0] and ref $_[0] eq 'Smartcat::Client::Configuration') { }
78 0 0 unless (looks_like_number($seconds))
105 0 0 if (%$query_params)
111 0 0 if defined $body_data and ref $body_data ne 'ARRAY' and $body_data->can('to_hash')
115 0 0 %$post_params ? :
119 0 0 if ($method eq 'POST') { }
0 0 elsif ($method eq 'PUT') { }
0 0 elsif ($method eq 'GET') { }
0 0 elsif ($method eq 'HEAD') { }
0 0 elsif ($method eq 'DELETE') { }
0 0 elsif ($method eq 'PATCH') { }
125 0 0 lc $header_params->{'Content-Type'} eq 'multipart/form-data' ? :
136 0 0 lc $header_params->{'Content-Type'} eq 'multipart/form-data' ? :
167 0 0 unless ($_response->is_success)
197 0 0 if (ref $object eq 'ARRAY') { }
232 0 0 if (ref $value eq 'DateTime') { }
249 0 0 if (not defined $data) { }
0 0 elsif (substr($class, 0, 5) eq 'HASH[') { }
0 0 elsif (substr($class, 0, 6) eq 'ARRAY[') { }
0 0 elsif ($class eq 'DateTime') { }
0 0 elsif (grep /^$class$/, ('string', 'int', 'float', 'bool', 'object')) { }
253 0 0 if ($class =~ /^HASH\[(.*),(.*)\]$/) { }
258 0 0 if (ref $decoded_data->{$key} eq 'HASH') { }
275 0 0 if $data eq '[]'
281 0 0 if (ref $_value eq 'ARRAY') { }
299 0 0 if (ref $data eq 'HASH') { }
315 0 0 if (@header == 0 or @header == 1 and $header[0] eq '') { }
0 0 elsif (grep m[^application/json$]i, @header) { }
333 0 0 if (@header == 0 or @header == 1 and $header[0] eq '') { }
0 0 elsif (grep m[^application/json$]i, @header) { }
353 0 0 unless $api_key
356 0 0 $prefix ? :
367 0 0 unless $auth_settings and @$auth_settings
374 0 0 if (not defined $auth) { }
392 0 0 unless keys %$tokens
395 0 0 if (my $uname = delete $tokens->{'username'})
402 0 0 if (my $access_token = delete $tokens->{'access_token'})
410 0 0 if ($in eq 'head') { }
0 0 elsif ($in eq 'query') { }