1<?php 2 3declare(strict_types=1); 4 5namespace JMS\Serializer\Exclusion; 6 7use JMS\Serializer\Context; 8use JMS\Serializer\Metadata\ClassMetadata; 9use JMS\Serializer\Metadata\PropertyMetadata; 10 11/** 12 * Interface for exclusion strategies. 13 * 14 * @author Johannes M. Schmitt <schmittjoh@gmail.com> 15 */ 16interface ExclusionStrategyInterface 17{ 18 /** 19 * Whether the class should be skipped. 20 */ 21 public function shouldSkipClass(ClassMetadata $metadata, Context $context): bool; 22 23 /** 24 * Whether the property should be skipped. 25 */ 26 public function shouldSkipProperty(PropertyMetadata $property, Context $context): bool; 27} 28