Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | abstract class AbstractManyRelation extends AbstractRelation implements ManyRelationInterface |
||
12 | { |
||
13 | /** |
||
14 | * @param \Swis\JsonApi\Client\Collection $included |
||
15 | * |
||
16 | * @return $this |
||
17 | */ |
||
18 | 230 | public function associate(Collection $included) |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * @return \Swis\JsonApi\Client\Collection |
||
27 | */ |
||
28 | 185 | public function getIncluded(): Collection |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * Sort the included collection by the given key. |
||
35 | * You can also pass your own callback to determine how to sort the collection values. |
||
36 | * |
||
37 | * @param callable $callback |
||
38 | * @param int $options |
||
39 | * @param bool $descending |
||
40 | * |
||
41 | * @return $this |
||
42 | */ |
||
43 | 5 | public function sortBy($callback, $options = SORT_REGULAR, $descending = false) |
|
56 |