• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

voku / Arrayy / 24327721426

13 Apr 2026 05:45AM UTC coverage: 89.336% (-0.02%) from 89.36%
24327721426

Pull #155

github

web-flow
Merge cbaf5472b into b6ddb08f8
Pull Request #155: Tighten PHPStan ignore handling and replace broad suppressions with targeted fixes

12 of 15 new or added lines in 4 files covered. (80.0%)

87 existing lines in 2 files now uncovered.

2488 of 2785 relevant lines covered (89.34%)

100.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

58.33
/src/ArrayyIterator.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Arrayy;
6

7
/**
8
 * @template TKey of array-key
9
 * @template T
10
 * @extends \ArrayIterator<TKey,T>
11
 */
12
class ArrayyIterator extends \ArrayIterator
13
{
14
    /**
15
     * @var string
16
     *
17
     * @phpstan-var string|class-string<\Arrayy\Arrayy<TKey,T>>
18
     */
19
    private $class;
20

21
    /**
22
     * @param array<int|string,mixed> $array
23
     * @param int                     $flags
24
     * @param string                  $class
25
     *
26
     * @phpstan-param array<TKey,T> $array
27
     */
28
    public function __construct(array $array = [], int $flags = 0, string $class = '')
29
    {
30
        $this->class = $class;
102✔
31

32
        parent::__construct($array, $flags);
102✔
33
    }
34

35
    /**
36
     * @return Arrayy|mixed will return a "Arrayy"-object instead of an array
37
     */
38
    #[\ReturnTypeWillChange]
39
    public function current()
40
    {
41
        $value = parent::current();
90✔
42

43
        if (\is_array($value)) {
90✔
44
            $class = $this->class;
10✔
45
            $value = $class::create($value, static::class, false);
10✔
46
        }
47

48
        return $value;
90✔
49
    }
50

51
    /**
52
     * @param string $offset
53
     *
54
     * @return Arrayy|mixed
55
     *                      <p>Will return a "Arrayy"-object instead of an array.</p>
56
     *
57
     * @phpstan-param TKey $offset
58
     * @param-return Arrayy<TKey,T>|mixed
59
     */
60
    #[\ReturnTypeWillChange]
61
    public function offsetGet($offset)
62
    {
63
        $value = parent::offsetGet($offset);
×
64

65
        if (\is_array($value)) {
×
NEW
66
            $class = $this->class;
×
NEW
67
            $value = $class::create($value, static::class, false);
×
68
        }
69

70
        return $value;
×
71
    }
72
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc