Passed
Push — master ( f881c5...014efc )
by Leo
02:57
created

Session::mapSubObjects()   D

Complexity

Conditions 25
Paths 25

Size

Total Lines 48
Code Lines 44

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 48
rs 4.8642
c 0
b 0
f 0
cc 25
eloc 44
nc 25
nop 2

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace leocata\M1\Types;
4
5
use leocata\M1\Abstracts\Types;
6
7
/**
8
 * Class Session
9
 * @package leocata\M1\Types
10
 */
11
class Session extends Types
12
{
13
14
    /**
15
     * Session identifier
16
     * @var string
17
     */
18
    public $id;
19
20
    /**
21
     * Session name
22
     * @var string
23
     */
24
    public $name;
25
26
    /**
27
     * Timestamp of session’s start (in milliseconds since 01.01.1970)
28
     * @var integer
29
     */
30
    public $created;
31
32
    /**
33
     * Timestamp of session parameters modification (in milliseconds since 01.01.1970)
34
     * @var integer
35
     */
36
    public $updated;
37
38
    /**
39
     * List of User IDs - current session's members
40
     * @var array
41
     */
42
    public $parties;
43
44
    /**
45
     * User status concerning this session
46
     * @var integer
47
     */
48
    public $status;
49
50
    /**
51
     * List of Admin IDs
52
     * @var array
53
     */
54
    public $admins;
55
56
    /**
57
     * total number of messages in chat
58
     * @var integer
59
     */
60
    public $count;
61
    /**
62
     * Number of new messages
63
     * @var integer
64
     */
65
    public $new;
66
67
    /**
68
     * Timestamp of last message (in milliseconds since 01.01.1970)
69
     * @var integer
70
     */
71
    public $time;
72
}
73