GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 12-15 lines in 2 locations

src/Str.php 1 location

@@ 50-61 (lines=12) @@
47
     *
48
     * @return StreamInterface<self>
49
     */
50
    public function split(string $delimiter = null): StreamInterface
51
    {
52
        $parts = empty($delimiter) ?
53
                str_split($this->value) : explode($delimiter, $this->value);
54
        $stream = new Stream(self::class);
55
56
        foreach ($parts as $part) {
57
            $stream = $stream->add(new self($part));
58
        }
59
60
        return $stream;
61
    }
62
63
    /**
64
     * Returns a collection of the string splitted by the given chunk size

src/StringPrimitive.php 1 location

@@ 58-72 (lines=15) @@
55
     *
56
     * @return TypedCollectionInterface
57
     */
58
    public function split(string $delimiter = null): TypedCollectionInterface
59
    {
60
        $parts = empty($delimiter) ?
61
                str_split($this->value) : explode($delimiter, $this->value);
62
        $strings = [];
63
64
        foreach ($parts as $part) {
65
            $strings[] = new self($part);
66
        }
67
68
        return new TypedCollection(
69
            self::class,
70
            $strings
71
        );
72
    }
73
74
    /**
75
     * Returns a collection of the string splitted by the given chunk size