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

plank / laravel-metable / 8730412986

18 Apr 2024 12:20AM UTC coverage: 90.887% (-7.9%) from 98.76%
8730412986

Pull #102

github

web-flow
Merge pull request #101 from anilkumarthakur60/v6

V6 migration and ci fixes
Pull Request #102: V6

185 of 222 new or added lines in 16 files covered. (83.33%)

26 existing lines in 7 files now uncovered.

369 of 406 relevant lines covered (90.89%)

64.39 hits per line

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

85.71
/src/DataType/ScalarHandler.php
1
<?php
2

3
namespace Plank\Metable\DataType;
4

5
/**
6
 * Handle serialization of scalar values.
7
 */
8
abstract class ScalarHandler implements HandlerInterface
9
{
10
    /**
11
     * The name of the scalar data type.
12
     *
13
     * @var string
14
     */
15
    protected $type;
16

17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function getDataType(): string
21
    {
22
        return $this->type;
294✔
23
    }
24

25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function canHandleValue(mixed $value): bool
29
    {
30
        return gettype($value) == $this->type;
306✔
31
    }
32

33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function serializeValue(mixed $value): string
37
    {
38
        settype($value, 'string');
288✔
39

40
        return $value;
288✔
41
    }
42

43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function unserializeValue(string $serializedValue): mixed
47
    {
48
        settype($serializedValue, $this->type);
126✔
49

50
        return $serializedValue;
126✔
51
    }
52

53
    public function isIdempotent(): bool
54
    {
NEW
55
        return true;
×
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

© 2026 Coveralls, Inc