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

wol-soft / php-json-schema-model-generator / 24135379642

08 Apr 2026 12:29PM UTC coverage: 98.249% (-0.4%) from 98.654%
24135379642

Pull #125

github

wol-soft
CI
Pull Request #125: attributes

1507 of 1537 new or added lines in 73 files covered. (98.05%)

4 existing lines in 3 files now uncovered.

4376 of 4454 relevant lines covered (98.25%)

621.28 hits per line

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

85.71
/src/Model/Validator/PassThroughTypeCheckValidator.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace PHPModelGenerator\Model\Validator;
6

7
use PHPModelGenerator\Exception\Generic\InvalidTypeException;
8
use PHPModelGenerator\Model\Property\PropertyInterface;
9
use ReflectionType;
10

11
/**
12
 * Class PassThroughTypeCheckValidator
13
 *
14
 * @package PHPModelGenerator\Model\Validator
15
 */
16
class PassThroughTypeCheckValidator extends PropertyValidator implements TypeCheckInterface
17
{
18
    /** @var string[] */
19
    protected array $types;
20

21
    /**
22
     * PassThroughTypeCheckValidator constructor.
23
     */
24
    public function __construct(
40✔
25
        ReflectionType $passThroughType,
26
        PropertyInterface $property,
27
        TypeCheckValidator|MultiTypeCheckValidator $typeCheckValidator,
28
    ) {
29
        $this->types = array_merge($typeCheckValidator->getTypes(), [$passThroughType->getName()]);
40✔
30

31
        parent::__construct(
40✔
32
            $property,
40✔
33
            sprintf(
40✔
34
                '%s && %s',
40✔
35
                ReflectionTypeCheckValidator::fromReflectionType($passThroughType, $property)->getCheck(),
40✔
36
                $typeCheckValidator->getCheck(),
40✔
37
            ),
40✔
38
            InvalidTypeException::class,
40✔
39
            [[$passThroughType->getName(), $property->getType()->getNames()[0]]],
40✔
40
        );
40✔
41
    }
42

43
    /**
44
     * @inheritDoc
45
     */
UNCOV
46
    public function getTypes(): array
×
47
    {
UNCOV
48
        return $this->types;
×
49
    }
50
}
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