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

PHP-Alchemist / coreFiles / 15337780671

30 May 2025 02:23AM UTC coverage: 92.587%. First build
15337780671

Pull #14

github

web-flow
Merge pull request #8 from PHP-Alchemist/feature/valueObjects

[feature] valueObjects
Pull Request #14: v2.2.0

74 of 103 new or added lines in 9 files covered. (71.84%)

587 of 634 relevant lines covered (92.59%)

4.53 hits per line

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

44.44
/src/ValueObject/Abstract/AbstractNumber.php
1
<?php
2

3
namespace PHPAlchemist\ValueObject\Abstract;
4

5
use PHPAlchemist\ValueObject\Contract\VONumberInterface;
6

7
abstract class AbstractNumber implements VONumberInterface
8
{
9
    protected readonly int $value;
10

11
    public function __construct(int $value)
2✔
12
    {
13
        $this->value = $value;
2✔
14
    }
15

16
    public function getValue() : int|float
2✔
17
    {
18
        return $this->value;
2✔
19
    }
20

NEW
21
    public function equals(VONumberInterface $number) : bool
×
22
    {
23
        if (
NEW
24
            $number === $this
×
NEW
25
            && $number->getValue() === $this->getValue()
×
26
        ) {
NEW
27
            return true;
×
28
        }
29

NEW
30
        return false;
×
31
    }
32
}
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