TimeEntryHydrator::canHydrate()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
crap 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