| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Arcanedev\Composer\Entities\PackageTraits; |
||
| 23 | private function mergeAutoload(RootPackageInterface $root) |
||
| 24 | { |
||
| 25 | if ( ! empty($autoload = $this->package->getAutoload())) { |
||
|
|
|||
| 26 | /** @var \Composer\Package\RootPackageInterface $unwrapped */ |
||
| 27 | $unwrapped = static::unwrapIfNeeded($root, 'setAutoload'); |
||
| 28 | $unwrapped->setAutoload(array_merge_recursive( |
||
| 29 | $root->getAutoload(), Util::fixRelativePaths($this->path, $autoload) |
||
| 30 | )); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
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: