Passed
Push — master ( 9eeea6...aec556 )
by Stephen
02:58
created

OrganizationAddressService::zip()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
4
namespace Sfneal\Users\Services;
5
6
7
use Sfneal\Actions\AbstractService;
8
9
class OrganizationAddressService extends AbstractService
10
{
11
    /**
12
     * Retrieve an Organization's full address
13
     *
14
     * @return string|null
15
     */
16
    public static function full(): ?string
17
    {
18
        return self::street() . ', ' . self::city() . ', ' . self::state() . ' ' . self::zip();
19
    }
20
21
    /**
22
     * Retrieve an Organization's street address
23
     *
24
     * @return string|null
25
     */
26
    public static function street(): ?string
27
    {
28
        return config('users.org.address.street');
29
    }
30
31
    /**
32
     * Retrieve an Organization's city name
33
     *
34
     * @return string|null
35
     */
36
    public static function city(): ?string
37
    {
38
        return config('users.org.address.city');
39
    }
40
41
    /**
42
     * Retrieve an Organization's state abbreviation
43
     *
44
     * @return string|null
45
     */
46
    public static function state(): ?string
47
    {
48
        return config('users.org.address.state');
49
    }
50
51
    /**
52
     * Retrieve an Organization's zip code
53
     *
54
     * @return string|null
55
     */
56
    public static function zip(): ?string
57
    {
58
        return config('users.org.address.zip');
59
    }
60
}
61