Completed
Push — master ( 83ff7f...5810d6 )
by Nicholas
01:05
created

USPSLookup   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 4
dl 0
loc 34
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A Address() 0 4 1
A Tracking() 0 4 1
A Price() 0 4 1
A Pickup() 0 4 1
1
<?php
2
3
namespace Nickcheek\USPSLookup;
4
5
use Nickcheek\USPSLookup\Service\Address;
6
use Nickcheek\USPSLookup\Service\Price;
7
use Nickcheek\USPSLookup\Service\Tracking;
8
use Nickcheek\USPSLookup\Service\Pickup;
9
10
11
class USPSLookup
12
{
13
    protected static $user;
14
    protected static $service = 'http://production.shippingapis.com/ShippingAPI.dll?API=';
15
16
    public function __construct($user = '')
17
    {
18
        self::$user = $user;
19
        if($user == ''){
20
            self::$user = env('USPS');
21
        }
22
    }
23
24
    public function Address()
25
    {
26
        return new Address();
27
    }
28
29
    public function Tracking()
30
    {
31
        return new Tracking();
32
    }
33
34
    public function Price()
35
    {
36
        return new Price();
37
    }
38
39
    public function Pickup()
40
    {
41
        return new Pickup();
42
    }
43
44
}
45