Code Duplication    Length = 10-10 lines in 4 locations

src/Api/Config/Config.php 4 locations

@@ 645-654 (lines=10) @@
642
     *
643
     * @throws InvalidConfigException If the config value isn't an array.
644
     */
645
    private function assertArray($key, $value)
646
    {
647
        if (!is_array($value)) {
648
            throw new InvalidConfigException(sprintf(
649
                'The config key "%s" must be an array. Got: %s',
650
                $key,
651
                is_object($value) ? get_class($value) : gettype($value)
652
            ));
653
        }
654
    }
655
656
    /**
657
     * @param string $key
@@ 679-688 (lines=10) @@
676
     *
677
     * @throws InvalidConfigException If the config value isn't a string.
678
     */
679
    private function assertString($key, $value)
680
    {
681
        if (!is_string($value) && null !== $value) {
682
            throw new InvalidConfigException(sprintf(
683
                'The config key "%s" must be a string. Got: %s',
684
                $key,
685
                is_object($value) ? get_class($value) : gettype($value)
686
            ));
687
        }
688
    }
689
690
    /**
691
     * @param string $key
@@ 696-705 (lines=10) @@
693
     *
694
     * @throws InvalidConfigException If the config value isn't an integer.
695
     */
696
    private function assertInteger($key, $value)
697
    {
698
        if (!is_int($value) && null !== $value) {
699
            throw new InvalidConfigException(sprintf(
700
                'The config key "%s" must be an integer. Got: %s',
701
                $key,
702
                is_object($value) ? get_class($value) : gettype($value)
703
            ));
704
        }
705
    }
706
707
    /**
708
     * @param string $key
@@ 713-722 (lines=10) @@
710
     *
711
     * @throws InvalidConfigException If the config value isn't a boolean.
712
     */
713
    private function assertBoolean($key, $value)
714
    {
715
        if (!is_bool($value) && null !== $value) {
716
            throw new InvalidConfigException(sprintf(
717
                'The config key "%s" must be a bool. Got: %s',
718
                $key,
719
                is_object($value) ? get_class($value) : gettype($value)
720
            ));
721
        }
722
    }
723
724
    /**
725
     * @param string $key