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

wol-soft / php-json-schema-model-generator-production / 23464244096

23 Mar 2026 10:57PM UTC coverage: 20.543% (+0.8%) from 19.718%
23464244096

Pull #13

github

web-flow
Delete composer.lock
Pull Request #13: Upgrade to PHP 8.4 minimum and PHPUnit 13

4 of 67 new or added lines in 35 files covered. (5.97%)

43 existing lines in 30 files now uncovered.

106 of 516 relevant lines covered (20.54%)

0.6 hits per line

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

0.0
/src/Exception/Arrays/InvalidItemException.php
1
<?php
2

3
declare(strict_types = 1);
4

5
namespace PHPModelGenerator\Exception\Arrays;
6

7
use PHPModelGenerator\Exception\ValidationException;
8

9
/**
10
 * Class InvalidItemException
11
 *
12
 * @package PHPModelGenerator\Exception\Arrays
13
 */
14
class InvalidItemException extends ValidationException
15
{
16
    /**
17
     * InvalidItemException constructor.
18
     *
19
     * @param $providedValue
20
     * @param ValidationException[][] $invalidItems
21
     */
NEW
22
    public function __construct($providedValue, string $propertyName, protected array $invalidItems)
×
23
    {
24
        parent::__construct($this->getErrorMessage($propertyName), $propertyName, $providedValue);
×
25
    }
26

27
    /**
28
     * @return ValidationException[][]
29
     */
30
    public function getInvalidItems(): array
×
31
    {
32
        return $this->invalidItems;
×
33
    }
34

35
    protected function getErrorMessage(string $propertyName): string
×
36
    {
37
        $output = "Invalid items in array $propertyName:";
×
38
        foreach ($this->invalidItems as $itemIndex => $exceptions) {
×
39
            $output .= "\n  - invalid item #$itemIndex\n    * " .
×
40
                implode(
×
41
                    "\n    * ",
×
42
                    str_replace(
×
43
                        "\n",
×
44
                        "\n    ",
×
NEW
45
                        array_map(fn(ValidationException $exception): string => $exception->getMessage(), $exceptions)
×
46
                    )
×
47
                );
×
48
        }
49

50
        return $output;
×
51
    }
52
}
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