1 | <?php namespace Arcanedev\Composer\Entities\PackageTraits; |
||
13 | trait RepositoriesTrait |
||
14 | { |
||
15 | /* ------------------------------------------------------------------------------------------------ |
||
16 | | Main Functions |
||
17 | | ------------------------------------------------------------------------------------------------ |
||
18 | */ |
||
19 | /** |
||
20 | * Add a collection of repositories described by the given configuration |
||
21 | * to the given package and the global repository manager. |
||
22 | * |
||
23 | * @param \Composer\Package\RootPackageInterface $root |
||
24 | * @param \Arcanedev\Composer\Entities\PluginState $state |
||
25 | */ |
||
26 | private function addRepositories(RootPackageInterface $root, PluginState $state) |
||
46 | |||
47 | /* ------------------------------------------------------------------------------------------------ |
||
48 | | Other Functions |
||
49 | | ------------------------------------------------------------------------------------------------ |
||
50 | */ |
||
51 | /** |
||
52 | * Add a repository to collection of repositories. |
||
53 | * |
||
54 | * @param \Composer\Repository\RepositoryManager $repoManager |
||
55 | * @param array $repositories |
||
56 | * @param array $repoJson |
||
57 | * @param bool $prepend |
||
58 | */ |
||
59 | private function addRepository( |
||
76 | } |
||
77 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: