1 | <?php |
||
11 | class LibraryInstaller extends BaseLibraryInstaller |
||
12 | { |
||
13 | /** |
||
14 | * Paths array. |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $paths = [ |
||
19 | 'base' => '/../../../../../', |
||
20 | 'app' => '/../../../../../app/', |
||
21 | 'bootstrap' => '/../../../../../bootstrap/', |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * Return the path. |
||
26 | * |
||
27 | * @param string $path |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | protected function getPath($path): string |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) |
||
46 | |||
47 | /** |
||
48 | * Installs specific package. |
||
49 | * |
||
50 | * @param InstalledRepositoryInterface $repo repository in which to check |
||
51 | * @param PackageInterface $package package instance |
||
52 | * |
||
53 | * @throws \Exception |
||
54 | * |
||
55 | * @return void |
||
56 | */ |
||
57 | public function install(InstalledRepositoryInterface $repo, PackageInterface $package) |
||
61 | |||
62 | /** |
||
63 | * Updates specific package. |
||
64 | * |
||
65 | * @param InstalledRepositoryInterface $repo repository in which to check |
||
66 | * @param PackageInterface $initial already installed package version |
||
67 | * @param PackageInterface $target updated version |
||
68 | * |
||
69 | * @throws InvalidArgumentException if $initial package is not installed |
||
70 | * |
||
71 | * @return void |
||
72 | */ |
||
73 | public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) |
||
77 | |||
78 | /** |
||
79 | * Uninstalls specific package. |
||
80 | * |
||
81 | * @param InstalledRepositoryInterface $repo repository in which to check |
||
82 | * @param PackageInterface $package package instance |
||
83 | * |
||
84 | * @throws \Exception |
||
85 | * |
||
86 | * @return void |
||
87 | */ |
||
88 | public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) |
||
92 | } |
||
93 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.