You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example, a mapper error is only thrown when validating b, not when validating a.
Note that parentheses are supported by both psalm and phpstan, and are actually often generated when using phpcs in fix mode, which makes use of phpstan's docblock parser and printer.
<?php
use CuyZ\Valinor\MapperBuilder;
require 'vendor/autoload.php';
final class a {
/**
* @param (0|1) $a
*/
public function __construct(
public readonly int $a,
) {
}
}
final class b {
/**
* @param 0|1 $a
*/
public function __construct(
public readonly int $a,
) {
}
}
(new MapperBuilder)->mapper()->map(a::class, 2);
(new MapperBuilder)->mapper()->map(b::class, 2);
The text was updated successfully, but these errors were encountered:
In the following example, a mapper error is only thrown when validating
b
, not when validatinga
.Note that parentheses are supported by both psalm and phpstan, and are actually often generated when using phpcs in fix mode, which makes use of phpstan's docblock parser and printer.
The text was updated successfully, but these errors were encountered: