Code Duplication    Length = 10-10 lines in 2 locations

src/Api/Cache/CacheFile.php 2 locations

@@ 115-124 (lines=10) @@
112
     *
113
     * @throws InvalidArgumentException If the package was not found.
114
     */
115
    public function getPackageFile($packageName)
116
    {
117
        Assert::packageName($packageName);
118
119
        if (!isset($this->packageFiles[$packageName])) {
120
            throw new InvalidArgumentException(sprintf("Could not find a package named %s.", $packageName));
121
        }
122
123
        return $this->packageFiles[$packageName];
124
    }
125
126
    /**
127
     * Returns the package files in the cache file.
@@ 197-206 (lines=10) @@
194
     *
195
     * @throws InvalidArgumentException If the install info was not found.
196
     */
197
    public function getInstallInfo($packageName)
198
    {
199
        Assert::packageName($packageName);
200
201
        if (!isset($this->installInfos[$packageName])) {
202
            throw new InvalidArgumentException(sprintf("Could not find a package named %s.", $packageName));
203
        }
204
205
        return $this->installInfos[$packageName];
206
    }
207
208
    /**
209
     * Returns the install info for all packages in the cache file.