Completed
Push — work-fleets ( 5c3a01...351cf4 )
by SuperNova.WS
06:40
created

BuddyContainer::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 14
nc 1
nop 1
dl 0
loc 21
rs 9.3142
c 2
b 0
f 0
ccs 0
cts 16
cp 0
crap 2
1
<?php
2
3
namespace Buddy;
4
5
/**
6
 * Class BuddyContainer
7
 *
8
 * @method BuddyModel getModel()
9
 *
10
 * @property int|string $dbId Entity DB ID
11
 * @property int|string $playerSenderId Who makes buddy request
12
 * @property int|string $playerOwnerId To whom this buddy request made
13
 * @property int        $buddyStatusId Current buddy request status
14
 * @property string     $requestText Request text
15
 *
16
 *
17
 * @package Buddy
18
 */
19
class BuddyContainer extends \EntityContainer {
20
21
  public function isEmpty() {
22
    return
23
      $this->buddyStatusId === null
24
      ||
25
      $this->buddyStatusId === BUDDY_REQUEST_NOT_SET
26
      ||
27
      empty($this->playerSenderId)
28
      ||
29
      empty($this->playerOwnerId);
30
  }
31
32
}
33