TimeEntryHydrator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 14
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A canHydrate() 0 8 2
1
<?php
2
3
namespace Marek\Toggable\Hydrator\TimeEntry;
4
5
use Marek\Toggable\API\Toggl\Values\TimeEntry\TimeEntry;
6
use Marek\Toggable\Hydrator\BaseHydrator;
7
8
/**
9
 * Class TimeEntryHydrator
10
 * @package Marek\Toggable\Hydrator\TimeEntry
11
 */
12
class TimeEntryHydrator extends BaseHydrator
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17 1
    public function canHydrate($object)
18
    {
19 1
        if ($object instanceof TimeEntry) {
20 1
            return true;
21
        }
22
23 1
        return false;
24
    }
25
}
26