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

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

30 Mar 2026 09:08AM UTC coverage: 98.331% (-0.4%) from 98.717%
23736910562

Pull #123

github

Enno Woortmann
Merge remote-tracking branch 'origin/master' into drafts
Pull Request #123: Introduce Draft-based architecture: eliminate legacy processors, centralize modifier/validator registration

1374 of 1399 new or added lines in 60 files covered. (98.21%)

3 existing lines in 2 files now uncovered.

4243 of 4315 relevant lines covered (98.33%)

588.89 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