OrganizationAddressService   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 50
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A zip() 0 3 1
A state() 0 3 1
A city() 0 3 1
A street() 0 3 1
A full() 0 3 1
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