1 | <?php namespace Arcanedev\Composer\Entities\PackageTraits; |
||
14 | trait BaseTrait |
||
15 | { |
||
16 | /* ------------------------------------------------------------------------------------------------ |
||
17 | | Other Functions |
||
18 | | ------------------------------------------------------------------------------------------------ |
||
19 | */ |
||
20 | /** |
||
21 | * Update Links with a 'self.version' constraint with the root package's version. |
||
22 | * |
||
23 | * @param string $type |
||
24 | * @param array $links |
||
25 | * @param \Composer\Package\RootPackageInterface $root |
||
26 | * |
||
27 | * @return array |
||
28 | */ |
||
29 | protected function replaceSelfVersionDependencies( |
||
59 | |||
60 | /** |
||
61 | * Get a full featured Package from a RootPackageInterface. |
||
62 | * |
||
63 | * @param \Composer\Package\RootPackageInterface|\Composer\Package\RootPackage $root |
||
64 | * @param string $method |
||
65 | * |
||
66 | * @return \Composer\Package\RootPackageInterface|\Composer\Package\RootPackage |
||
67 | */ |
||
68 | private static function unwrapIfNeeded( |
||
75 | } |
||
76 |
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: