Total Complexity | 6 |
Total Lines | 72 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | class DependentsResolver implements DependentsResolverInterface |
||
|
|||
17 | { |
||
18 | /** @var CompositeRepository */ |
||
19 | private $repository; |
||
20 | |||
21 | /** |
||
22 | * Constructor. |
||
23 | * |
||
24 | * @param RepositoryInterface $repository |
||
25 | */ |
||
26 | 1 | public function __construct(RepositoryInterface $repository) |
|
29 | 1 | } |
|
30 | |||
31 | /** |
||
32 | * Resolves the dependents of the package. |
||
33 | * |
||
34 | * @param string $packageName |
||
35 | * |
||
36 | * @return array |
||
37 | */ |
||
38 | 5 | public function resolve(string $packageName): array |
|
39 | { |
||
40 | 5 | return $this->getDependents( |
|
41 | 5 | $packageName, |
|
42 | 5 | false, |
|
43 | 5 | [] |
|
44 | ); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Retrieves the dependents of a package in a recursive way. |
||
49 | * |
||
50 | * @param string $packageName |
||
51 | * @param bool $returnContext |
||
52 | * @param array $context |
||
53 | * |
||
54 | * @return array |
||
55 | */ |
||
56 | 10 | private function getDependents( |
|
88 | } |
||
89 | } |
||
90 |
This interface has been deprecated. The supplier of the interface has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.