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

tempestphp / tempest-framework / 14049246919

24 Mar 2025 09:42PM UTC coverage: 79.353% (-0.04%) from 79.391%
14049246919

push

github

web-flow
feat(support): support array parameters in string manipulations (#1073)

48 of 48 new or added lines in 2 files covered. (100.0%)

735 existing lines in 126 files now uncovered.

10492 of 13222 relevant lines covered (79.35%)

90.78 hits per line

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

85.71
/src/Tempest/Mapper/src/Serializers/ArrayOfObjectsSerializer.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Mapper\Serializers;
6

7
use Tempest\Mapper\Exceptions\CannotSerializeValue;
8
use Tempest\Mapper\Mappers\ObjectToArrayMapper;
9
use Tempest\Mapper\Serializer;
10

11
use function Tempest\map;
12

13
final class ArrayOfObjectsSerializer implements Serializer
14
{
15
    public function serialize(mixed $input): array
2✔
16
    {
17
        if (! is_array($input)) {
2✔
UNCOV
18
            throw new CannotSerializeValue('array');
×
19
        }
20

21
        $values = [];
2✔
22

23
        foreach ($input as $key => $object) {
2✔
24
            $values[$key] = map($object)->with(ObjectToArrayMapper::class)->do();
2✔
25
        }
26

27
        return $values;
2✔
28
    }
29
}
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