OrganizationAddressService::state()   A
last analyzed

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
namespace Sfneal\Users\Services;
4
5
class OrganizationAddressService
6
{
7
    /**
8
     * Retrieve an Organization's full address.
9
     *
10
     * @return string|null
11
     */
12
    public static function full(): ?string
13
    {
14
        return self::street().', '.self::city().', '.self::state().' '.self::zip();
15
    }
16
17
    /**
18
     * Retrieve an Organization's street address.
19
     *
20
     * @return string|null
21
     */
22
    public static function street(): ?string
23
    {
24
        return config('users.org.address.street');
25
    }
26
27
    /**
28
     * Retrieve an Organization's city name.
29
     *
30
     * @return string|null
31
     */
32
    public static function city(): ?string
33
    {
34
        return config('users.org.address.city');
35
    }
36
37
    /**
38
     * Retrieve an Organization's state abbreviation.
39
     *
40
     * @return string|null
41
     */
42
    public static function state(): ?string
43
    {
44
        return config('users.org.address.state');
45
    }
46
47
    /**
48
     * Retrieve an Organization's zip code.
49
     *
50
     * @return string|null
51
     */
52
    public static function zip(): ?string
53
    {
54
        return config('users.org.address.zip');
55
    }
56
}
57