Conditions | 5 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | protected function compileAggregates() |
||
17 | { |
||
18 | if (is_array($this->aggregates)) { |
||
19 | return; |
||
20 | } |
||
21 | |||
22 | $aggregates = []; |
||
23 | $aggregatesList = $this->getOption(RelationConfig::AGGREGATES); |
||
24 | if (!is_array($aggregatesList) || empty($aggregatesList)) { |
||
25 | $this->aggregates = $aggregates; |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | foreach ($aggregatesList as $name => $options) { |
||
30 | $agg = new Aggregate($name, /** @scrutinizer ignore-type */ $this, $options); |
||
31 | $aggregates[$name] = $agg; |
||
32 | } |
||
33 | |||
34 | $this->aggregates = $aggregates; |
||
35 | } |
||
46 |