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

phpolar / model / 15811103117

22 Jun 2025 09:45PM UTC coverage: 89.003% (-2.8%) from 91.815%
15811103117

push

github

web-flow
Merge pull request #130 from phpolar/merge-core

Merge core

3 of 10 new or added lines in 4 files covered. (30.0%)

2 existing lines in 1 file now uncovered.

259 of 291 relevant lines covered (89.0%)

3.66 hits per line

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

0.0
/src/AbstractPropertyValueExtractor.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Phpolar\Model;
6

7
use ReflectionProperty;
8

9
/**
10
 * Provides a default implementation used to *extract* the value of a property.
11
 */
12
abstract class AbstractPropertyValueExtractor implements PropertyValueSetterInterface
13
{
14
    protected mixed $val;
15

16
    /**
17
     * Immutably sets the property value
18
     *
19
     * @internal
20
     */
21
    public function withPropVal(ReflectionProperty $prop, object $obj): static
22
    {
NEW
23
        $copy = clone $this;
×
NEW
24
        $copy->val = $prop->isInitialized($obj) === true ? $prop->getValue($obj) : $prop->getDefaultValue();
×
NEW
25
        return $copy;
×
26
    }
27
}
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