• 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/HandlerInterface.php
1
<?php
2

3
namespace Plank\Metable\DataType;
4

5
/**
6
 * Provides means to serialize and unserialize values of different data types.
7
 */
8
interface HandlerInterface
9
{
10
    /**
11
     * Return the identifier for the data type being handled.
12
     *
13
     * @return string
14
     */
15
    public function getDataType(): string;
16

17
    /**
18
     * Determine if the value is of the correct type for this handler.
19
     *
20
     * @param mixed $value
21
     *
22
     * @return bool
23
     */
24
    public function canHandleValue(mixed $value): bool;
25

26
    /**
27
     * Convert the value to a string, so that it can be stored in the database.
28
     *
29
     * @param mixed $value
30
     *
31
     * @return string
32
     */
33
    public function serializeValue(mixed $value): string;
34

35
    public function getNumericValue(mixed $value): null|int|float;
36

37
    /**
38
     * Convert a serialized string back to its original value.
39
     *
40
     * @param string $serializedValue
41
     *
42
     * @return mixed
43
     */
44
    public function unserializeValue(string $serializedValue): mixed;
45

46
    public function useHmacVerification(): bool;
47
}
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