/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/ObjectMapper/Condition/IsNotNull.php
27 строк
666 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\Condition; use Symfony\Component\ObjectMapper\ConditionCallableInterface; /** * Skips mapping a property when its value is null. * * @implements ConditionCallableInterface<object, object> */ final class IsNotNull implements ConditionCallableInterface { public function __invoke(mixed $value, object $source, ?object $target): bool { return null !== $value; } }