1 | <?php |
||
21 | trait RegistryTrait |
||
22 | { |
||
23 | public function fetchPackageData($name) |
||
30 | |||
31 | /** |
||
32 | * @param $name |
||
33 | * @return \Composer\Repository\RepositoryInterface |
||
34 | */ |
||
35 | public function buildVcsRepository($name) |
||
42 | |||
43 | public function getPackageSearchUrl($name) |
||
47 | |||
48 | public function buildPackageUrl($name) |
||
52 | } |
||
53 |
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: