Code Duplication    Length = 12-12 lines in 2 locations

src/Truncation/TrimContextItemsStrategy.php 1 location

@@ 12-23 (lines=12) @@
9
        return [100, 50, 25, 10];
10
    }
11
12
    public function execute(array $payload): array
13
    {
14
        foreach (static::thresholds() as $threshold) {
15
            if (! $this->reportTrimmer->needsToBeTrimmed($payload)) {
16
                break;
17
            }
18
19
            $payload['context'] = $this->iterateContextItems($payload['context'], $threshold);
20
        }
21
22
        return $payload;
23
    }
24
25
    protected function iterateContextItems(array $contextItems, int $threshold): array
26
    {

src/Truncation/TrimStringsStrategy.php 1 location

@@ 12-23 (lines=12) @@
9
        return [1024, 512, 256];
10
    }
11
12
    public function execute(array $payload): array
13
    {
14
        foreach (static::thresholds() as $threshold) {
15
            if (! $this->reportTrimmer->needsToBeTrimmed($payload)) {
16
                break;
17
            }
18
19
            $payload = $this->trimPayloadString($payload, $threshold);
20
        }
21
22
        return $payload;
23
    }
24
25
    protected function trimPayloadString(array $payload, int $threshold): array
26
    {