Code Duplication    Length = 14-20 lines in 2 locations

src/Superdesk/ContentApiSdk/ContentApiSdk.php 2 locations

@@ 252-265 (lines=14) @@
249
     *
250
     * @return ResourceCollection
251
     */
252
    public function getItems($params, $page = 1, $maxResults = 25)
253
    {
254
        $itemCollection = new ResourceCollection(
255
            new ItemAdapter(
256
                $this->client,
257
                $this->getNewRequest(self::SUPERDESK_ENDPOINT_ITEMS, $params)
258
            )
259
        );
260
261
        $itemCollection->setCurrentPage($page);
262
        $itemCollection->setMaxPerPage($maxResults);
263
264
        return $itemCollection;
265
    }
266
267
    /**
268
     * Get package by identifier.
@@ 303-322 (lines=20) @@
300
     *
301
     * @return ResourceCollection
302
     */
303
    public function getPackages(
304
        $params,
305
        $resolveAssociations = false,
306
        $page = 1,
307
        $maxResults = 25
308
    ) {
309
        $packageCollection = new ResourceCollection(
310
            new PackageAdapter(
311
                $this->client,
312
                $this->getNewRequest(self::SUPERDESK_ENDPOINT_PACKAGES, $params),
313
                $this,
314
                $resolveAssociations
315
            )
316
        );
317
318
        $packageCollection->setCurrentPage($page);
319
        $packageCollection->setMaxPerPage($maxResults);
320
321
        return $packageCollection;
322
    }
323
324
    /**
325
     * Gets full objects for all associations for a package.