DepthChartPosition   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 2 1
1
<?php
2
namespace PhpDraft\Domain\Entities;
3
4
/**
5
 * Represents a position that each team must fill in a given draft
6
 * Picks can be assigned to a depth chart position (different from a pick's "position",
7
 * which is defined at the application level and therefore more rigid)
8
 * Picks are auto-assigned when possible to depth chart positions, but will generally
9
 * require anonymous user updates to them
10
 */
11
class DepthChartPosition {
12
  /** @var int $id The unique identifier for this depth chart position */
13
  public $id;
14
15
  /** @var int $draft_id The foreign key link to the draft that this position belongs to */
16
  public $draft_id;
17
18
  /** @var string $position The position this object represents */
19
  public $position;
20
21
  /** @var int $slots The number of players this position can hold per team */
22
  public $slots;
23
24
  /** @var int $display_order The order in which to display this position for each team */
25
  public $display_order;
26
27
  //For purposes of validation, we implement toString to define equality by the lowercase position
28
  public function __toString() {
29
    return strtolower($this->position);
30
  }
31
}