Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Arg | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Celema\Console; |
| 6 | |
| 7 | use Attribute; |
| 8 | |
| 9 | /** |
| 10 | * Declares an `__invoke()` parameter as a positional argument. |
| 11 | * |
| 12 | * The argument takes its name from the parameter, converted to kebab-case: |
| 13 | * `$targetDir` renders as `<target-dir>`. Positionals are matched to the |
| 14 | * arguments in declaration order and converted to the declared type: |
| 15 | * `string`, `int`, `float`, or a backed enum. A parameter with a default |
| 16 | * is optional and renders as `[<name>]`. |
| 17 | * |
| 18 | * An `array` parameter must be the last argument and takes the remaining |
| 19 | * positionals as strings: at least one, or any number when it has a |
| 20 | * default. It renders as `<name>...`. |
| 21 | * |
| 22 | * @api |
| 23 | */ |
| 24 | #[Attribute(Attribute::TARGET_PARAMETER)] |
| 25 | final class Arg |
| 26 | { |
| 27 | public function __construct( |
| 28 | public readonly string $description = '', |
| 29 | ) {} |
| 30 | } |
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.
| 28 | public readonly string $description = '', |
| 29 | ) {} |