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

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

03 Apr 2026 01:24AM UTC coverage: 98.248% (-0.4%) from 98.654%
23929639588

Pull #125

github

Enno Woortmann
docs
Pull Request #125: attributes

1496 of 1526 new or added lines in 66 files covered. (98.03%)

4 existing lines in 3 files now uncovered.

4374 of 4452 relevant lines covered (98.25%)

620.23 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