Completed
Push — work-fleets ( e0e753...5ee2f8 )
by SuperNova.WS
05:10
created

DBStaticUser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getOnlineTime() 0 5 2
1
<?php
2
3
class DBStaticUser extends DBStaticRecord {
4
5
  public static $_table = 'users';
6
  public static $_idField = 'id';
7
8
9
  /**
10
   * @param int $user_id
11
   *
12
   * @return string[]
13
   */
14
  public static function getOnlineTime($user_id) {
15
    $user_record = static::getRecordById($user_id, array('username', 'onlinetime'));
16
17
    return !empty($user_record) ? $user_record : array();
18
  }
19
20
}
21