1 | <?php namespace Rocket\Taxonomy\Repositories; |
||
16 | class TermHierarchyRepository implements TermHierarchyRepositoryInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var array<Vertex> all Vertices (Current and parents) |
||
20 | */ |
||
21 | protected $vertices; |
||
22 | |||
23 | /** |
||
24 | * @var \Illuminate\Cache\Repository |
||
25 | */ |
||
26 | protected $cache; |
||
27 | |||
28 | /** |
||
29 | * @param \Illuminate\Cache\Repository $cache |
||
30 | */ |
||
31 | 192 | public function __construct(\Illuminate\Cache\Repository $cache) |
|
35 | |||
36 | /** |
||
37 | * @param int $term_id |
||
38 | * @param int $parent_id |
||
39 | * @return bool |
||
40 | */ |
||
41 | 111 | public function addParent($term_id, $parent_id) |
|
45 | |||
46 | /** |
||
47 | * @param int $term_id |
||
48 | * @return bool |
||
49 | */ |
||
50 | 6 | public function unsetParents($term_id) |
|
54 | |||
55 | 9 | protected function supportsCommonTableExpressionQuery() |
|
69 | |||
70 | /** |
||
71 | * @return \Rocket\Taxonomy\Utils\RecursiveQueryInterface |
||
72 | */ |
||
73 | 9 | protected function getRecursiveRetriever() |
|
81 | |||
82 | /** |
||
83 | * Get the hierarchy cache key |
||
84 | * |
||
85 | * @param string $direction |
||
86 | * @param int $id |
||
87 | * @return string |
||
88 | */ |
||
89 | 12 | protected function getCacheKey($direction, $id) |
|
93 | |||
94 | /** |
||
95 | * Get all parents recursively |
||
96 | * |
||
97 | * @param int $id |
||
98 | * @return \Illuminate\Support\Collection |
||
99 | */ |
||
100 | 12 | public function getAncestry($id) |
|
111 | |||
112 | /** |
||
113 | * Get all childs recursively |
||
114 | * |
||
115 | * @param int $id |
||
116 | * @return \Illuminate\Support\Collection |
||
117 | */ |
||
118 | 12 | public function getDescent($id) |
|
129 | |||
130 | /** |
||
131 | * @param \Illuminate\Support\Collection $data |
||
132 | * @return array<Vertex> |
||
133 | */ |
||
134 | 9 | protected function prepareVertices($data) |
|
154 | |||
155 | /** |
||
156 | * Get all parents recursively |
||
157 | * |
||
158 | * @return array Vertex, DirectedGraph |
||
159 | */ |
||
160 | 12 | public function getAncestryGraph($id) |
|
184 | |||
185 | /** |
||
186 | * Get all childs recursively |
||
187 | * |
||
188 | * @return array Vertex, DirectedGraph |
||
189 | */ |
||
190 | 12 | public function getDescentGraph($id) |
|
214 | |||
215 | /** |
||
216 | * Get all the possible paths from this term |
||
217 | * |
||
218 | * @return array<array<int>> |
||
219 | */ |
||
220 | 12 | public function getAncestryPaths($id) |
|
232 | |||
233 | /** |
||
234 | * Get all the possible paths from this term |
||
235 | * |
||
236 | * @return array<array<int>> |
||
237 | */ |
||
238 | 12 | public function getDescentPaths($id) |
|
250 | } |
||
251 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.