Completed
Push — master ( ef29db...6cb927 )
by Ariel
06:10
created

Workspace::timezone()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
namespace Timegridio\Concierge;
4
5
use Timegridio\Concierge\Models\Business;
6
7
class Workspace
8
{
9
    protected $business;
10
11
    protected $timezone = null;
12
13
    public function business($business)
14
    {
15
        $this->business = $business;
16
17
        return $this;
18
    }
19
20
    public function timezone($timezone = null)
21
    {
22
        if ($timezone == null) {
23
            return $this->timezone = $this->business->timezone;
24
        }
25
26
        return $this->timezone = $timezone;
27
    }
28
}
29