Code Duplication    Length = 10-16 lines in 3 locations

src/Pinterest/Api.php 3 locations

@@ 384-399 (lines=16) @@
381
     *
382
     * @return Response
383
     */
384
    public function followUser($username)
385
    {
386
        if (empty($username)) {
387
            throw new InvalidArgumentException('Username is required.');
388
        }
389
390
        $request = new Request(
391
            'POST',
392
            'me/following/users/',
393
            array(
394
                'user' => (string) $username,
395
            )
396
        );
397
398
        return $this->execute($request);
399
    }
400
401
    /**
402
     * Create a board.
@@ 435-444 (lines=10) @@
432
     *
433
     * @return Response
434
     */
435
    public function deleteBoard($boardId)
436
    {
437
        if (empty($boardId)) {
438
            throw new InvalidArgumentException('The board id should not be empty.');
439
        }
440
441
        $request = new Request('DELETE', sprintf('boards/%d/', $boardId));
442
443
        return $this->execute($request);
444
    }
445
446
    /**
447
     * Create a pin on a board.
@@ 495-504 (lines=10) @@
492
     *
493
     * @return Response
494
     */
495
    public function deletePin($pinId)
496
    {
497
        if (empty($pinId)) {
498
            throw new InvalidArgumentException('The pin id should not be empty.');
499
        }
500
501
        $request = new Request('DELETE', sprintf('pins/%d/', $pinId));
502
503
        return $this->execute($request);
504
    }
505
506
    /**
507
     * Get the next items for a paged list.