Total Complexity | 4 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | class Section extends AbstractEntity implements IteratorAggregate { |
||
25 | |||
26 | use CrudTrait; |
||
27 | |||
28 | const DIR = 'sections'; |
||
29 | const TYPE = 'section'; |
||
30 | |||
31 | protected const MAP = [ |
||
32 | 'project' => Project::class |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * @var Project |
||
37 | */ |
||
38 | protected $parent; |
||
39 | |||
40 | public function __construct ($caller, array $data = []) { |
||
41 | parent::__construct($caller, $data); |
||
42 | $this->parent = $this->getProject(); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param array $filter |
||
47 | * @return Traversable|Task[] |
||
48 | */ |
||
49 | public function getIterator (array $filter = Task::GET_INCOMPLETE) { |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @param array $filter |
||
56 | * @return Task[] |
||
57 | */ |
||
58 | public function getTasks (array $filter = Task::GET_INCOMPLETE) { |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Factory. |
||
64 | * |
||
65 | * @depends after-create |
||
66 | * @return Task |
||
67 | */ |
||
68 | public function newTask () { |
||
72 | } |
||
73 | } |