/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/ObjectMapper/Tests/Fixtures/IsNotNullCondition/IsNotNullTargetMapping.php
27 строк
731 B
Nayte
[ObjectMapper] Add `IsNotNull` built-in condition
09 мар 2026, 18:15
09 мар 2026, 18:15
497820a
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ObjectMapper\Tests\Fixtures\IsNotNullCondition; use Symfony\Component\ObjectMapper\Attribute\Map; use Symfony\Component\ObjectMapper\Condition\IsNotNull; #[Map(source: IsNotNullSourceMapping::class)] class IsNotNullTargetMapping { public function __construct( #[Map(source: 'firstName', if: new IsNotNull())] public ?string $name = null, #[Map(source: 'score', if: new IsNotNull())] public ?int $points = null, ) { } }