/** * Construct an instance of a MapConstraint. */ public function __construct() { parent::__construct(new ClassTypeConstraint(MapInterface::class), new EitherConstraint(new ListConstraint(), new ClassTypeConstraint(ArrayAccess::class))); }
/** * Construct an instance of a ListConstraint. */ public function __construct() { parent::__construct(new ClassTypeConstraint(ListInterface::class), new EitherConstraint(new ClassTypeConstraint(ArrayObject::class), new PrimitiveTypeConstraint(CompoundTypes::COMPOUND_ARRAY))); }
/** * Construct an instance of a TraversableConstraint. */ public function __construct() { parent::__construct(new ClassTypeConstraint(FoldableInterface::class), new ListConstraint()); }
/** * Construct an instance of a TraversableConstraint. */ public function __construct() { parent::__construct(new ClassTypeConstraint(LeftFoldableInterface::class), new EitherConstraint(new ListConstraint(), new ClassTypeConstraint(Traversable::class))); }
/** * Construct an instance of a ListConstraint. */ public function __construct() { parent::__construct(new LeftFoldableConstraint(), new MapConstraint()); }
/** * Construct an instance of a MaybeConstraint. * * @param AbstractConstraint $other */ public function __construct(AbstractConstraint $other) { parent::__construct($other, new PrimitiveTypeConstraint(SpecialTypes::SPECIAL_NULL)); }