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.

Issues (4)

src/Elements/Line.php (1 issue)

1
<?php
2
3
namespace Spatie\CodeOutline\Elements;
4
5
use Spatie\Typed\Collection;
6
use Spatie\Typed\T;
7
8
class Line extends Collection
9
{
10
    public function __construct(int ...$values)
11
    {
12
        parent::__construct(T::int());
13
14
        $this->set($values);
15
    }
16
17
    public static function make(int $indentationCount, int $characterCount): self
18
    {
19
        $indentationValues = array_fill(0, $indentationCount, -1);
20
21
        $characterValues = array_fill(0, $characterCount, 1);
22
23
        $lineValues = array_merge($indentationValues, $characterValues);
24
25
        return new self(...$lineValues);
26
    }
27
28
    public function merge(self $line): self
29
    {
30
        $mergedLine = clone $this;
31
32
        foreach ($line as $position => $value) {
33
            $mergedLine[$position] = ($this[$position] ?? 0) + $value;
34
        }
35
36
        return $mergedLine;
37
    }
38
39
    public function getMaximumCharacterPositionDensity(): int
40
    {
41
        return $this->count()
42
            ? max($this->data)
43
            : 0;
44
    }
45
46
    public function offsetGet($offset): int
47
    {
48
        return parent::offsetGet($offset);
0 ignored issues
show
Bug Best Practice introduced by
The expression return parent::offsetGet($offset) could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
49
    }
50
}
51