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

OrganizationAddressService   A

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
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