lib/PagSeguro/API/Resource.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod 50.0% 1 / 2 totaltotal 77.2% 17 / 22 CC 2 SCAR 4.1
CC
2
Cov
86%
new
2.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« blib/lib/PagSeguro/API/Resource.pm ↑ Summary
1 package PagSeguro::API::Resource;
2 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 sub new {
6 12 ▶ my $class = shift;
Subroutine new: called CC=2 SCAR=8.1
Pod undocumented
7 12 ▶ return bless {
Condition33%1/3
$class || ref $class
l!l&&r!l&&!r
1200
MC/DC0%0/2
$class || ref $class
$class ref $class
Truth table33%1/3
A || B
A= $classB= ref $class
ABresult
1X1
011
000
8 _config => {
9 BASE_URI => 'https://ws.pagseguro.uol.com.br',
10 SANDBOX_URI => 'https://ws.sandbox.pagseguro.uol.com.br',
11 CHECKOUT => '/v2/checkout/',
12 CHECKOUT_PAYMENT =>
13 'https://pagseguro.uol.com.br/v2/checkout/payment.html',
14 SANDBOX_CHECKOUT_PAYMENT =>
15 'https://sandbox.pagseguro.uol.com.br/v2/checkout/payment.html',
16 TRANSACTION => '/v2/transactions/',
17 ABANDONED => 'abandoned',
18 NOTIFICATIONS => 'notifications/',
19  
20 }
21 }, $class || ref $class;
22 }
23  
24 # methods
25 sub get {
26 2 ▶ my ($self, $code) = @_;
Subroutine get: called CC=1 SCAR=0.0
Pod documented
27 2 return $self->{_config}->{$code};
28 }
29  
30 6 1;
31 __END__
« blib/lib/PagSeguro/API/Resource.pm ↑ Summary