Workspace   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 22
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A business() 0 8 1
A timezone() 0 6 2
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 15
    public function business($business)
14
    {
15 15
        $this->business = $business;
16
17 15
        $this->timezone($this->business->timezone);
18
19 15
        return $this;
20
    }
21
22 15
    public function timezone($timezone = null)
23
    {
24 15
        $this->timezone = ($timezone !== null) ?: $this->business->timezone;
25
26 15
        return $this;
27
    }
28
}
29