Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| MissingColumn | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| forColumn | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Celemas\Quma\Exception; |
| 6 | |
| 7 | /** @api */ |
| 8 | final class MissingColumn extends HydrationFailure |
| 9 | { |
| 10 | /** |
| 11 | * @param class-string $class |
| 12 | * @param non-empty-string $parameter |
| 13 | * @param non-empty-string $column |
| 14 | * @param list<string> $rowKeys |
| 15 | */ |
| 16 | public static function forColumn( |
| 17 | string $class, |
| 18 | string $parameter, |
| 19 | string $column, |
| 20 | ?string $sourcePath, |
| 21 | array $rowKeys, |
| 22 | ): self { |
| 23 | return new self(self::message( |
| 24 | $class, |
| 25 | $sourcePath, |
| 26 | "missing required column '{$column}' for parameter '\${$parameter}'. Row keys: " |
| 27 | . self::formatRowKeys($rowKeys) |
| 28 | . '.', |
| 29 | )); |
| 30 | } |
| 31 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 17 | string $class, |
| 18 | string $parameter, |
| 19 | string $column, |
| 20 | ?string $sourcePath, |
| 21 | array $rowKeys, |
| 22 | ): self { |
| 23 | return new self(self::message( |
| 24 | $class, |
| 25 | $sourcePath, |
| 26 | "missing required column '{$column}' for parameter '\${$parameter}'. Row keys: " |
| 27 | . self::formatRowKeys($rowKeys) |
| 28 | . '.', |
| 29 | )); |
| 30 | } |