| @@ 70-80 (lines=11) @@ | ||
| 67 | /** |
|
| 68 | * @return null|LockFile |
|
| 69 | */ |
|
| 70 | public function getLockFile() |
|
| 71 | { |
|
| 72 | if (null === $this->lockFile) { |
|
| 73 | $filePath = $this->getPath('composer.lock'); |
|
| 74 | if (file_exists($filePath)) { |
|
| 75 | $this->lockFile = LockFile::fromFilePath($this->root, $filePath); |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||
| 79 | return $this->lockFile; |
|
| 80 | } |
|
| 81 | ||
| 82 | public function directlyRequires(string $packageName) : bool |
|
| 83 | { |
|
| @@ 50-60 (lines=11) @@ | ||
| 47 | return $lockFile; |
|
| 48 | } |
|
| 49 | ||
| 50 | public function getInstalledPackagesFile() : InstalledPackagesFile |
|
| 51 | { |
|
| 52 | if (null === $this->installedPackagesFile) { |
|
| 53 | $filePath = $this->getPath('vendor/composer/installed.json'); |
|
| 54 | if (file_exists($filePath)) { |
|
| 55 | $this->installedPackagesFile = InstalledPackagesFile::fromFilePath($this, $filePath); |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | return $this->installedPackagesFile; |
|
| 60 | } |
|
| 61 | ||
| 62 | public function getVendorDir() : string |
|
| 63 | { |
|