Passed
Push — master ( 8f2f39...434123 )
by y
01:50
created

SyncTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getEvents() 0 2 1
1
<?php
2
3
namespace Helix\Asana\Base\AbstractEntity;
4
5
use Helix\Asana\Base\AbstractEntity;
6
use Helix\Asana\Event;
7
8
/**
9
 * Adds event syncing to entities.
10
 *
11
 * @mixin AbstractEntity
12
 */
13
trait SyncTrait {
14
15
    /**
16
     * Events since the last sync.
17
     *
18
     * @depends after-create
19
     * @param null|string $token
20
     * @return Event[]
21
     */
22
    public function getEvents (?string &$token) {
23
        return $this->api->sync($this->getGid(), $token);
24
    }
25
}