User   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A events() 0 3 1
A enrollments() 0 3 1
A find() 0 3 1
A eventsFromTo() 0 3 1
A eventsFrom() 0 3 1
1
<?php
2
3
/*
4
 * @author  Xavier Chopin <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace App\Model\API;
11
12
13
class User extends ApiModel
14
{
15
16
    public static function find(String $id)
17
    {
18
        return parent::get("users/$id");
19
    }
20
21
    public static function enrollments(String $id)
22
    {
23
        return parent::get("users/$id/enrollments");
24
    }
25
26
    public static function events(String $id)
27
    {
28
        return parent::get("users/$id/events");
29
    }
30
31
    public static function eventsFrom(String $id, String $from)
32
    {
33
        return parent::get("users/$id/events?from=$from");
34
    }
35
36
    public static function eventsFromTo(String $id, String $from, String $to)
37
    {
38
        return parent::get("users/$id/events?from=$from&to=$to");
39
    }
40
41
42
}