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

plank / laravel-metable / 12172137688

05 Dec 2024 02:34AM UTC coverage: 99.535%. Remained the same
12172137688

push

github

web-flow
Merge pull request #111 from plank/php-84

Add PHP 8.4 support

642 of 645 relevant lines covered (99.53%)

191.03 hits per line

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

100.0
/src/DataType/ArrayHandler.php
1
<?php
2

3
namespace Plank\Metable\DataType;
4

5
/**
6
 * Handle serialization of arrays.
7
 * @deprecated Use SignedSerializeHandler instead.
8
 */
9
class ArrayHandler implements HandlerInterface
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function getDataType(): string
15
    {
16
        return 'array';
12✔
17
    }
18

19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function canHandleValue(mixed $value): bool
23
    {
24
        return is_array($value);
6✔
25
    }
26

27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function serializeValue(mixed $value): string
31
    {
32
        return json_encode($value, JSON_THROW_ON_ERROR);
6✔
33
    }
34

35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function unserializeValue(string $serializedValue): mixed
39
    {
40
        return json_decode(
12✔
41
            $serializedValue,
12✔
42
            true,
12✔
43
            512,
12✔
44
            JSON_THROW_ON_ERROR
12✔
45
        );
12✔
46
    }
47

48
    public function getNumericValue(mixed $value): null|int|float
49
    {
50
        return null;
6✔
51
    }
52

53
    public function useHmacVerification(): bool
54
    {
55
        return false;
12✔
56
    }
57
}
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

© 2025 Coveralls, Inc