1: <?php
2:
3: /**
4: * Copyright 2015, Eduardo Trujillo
5: *
6: * For the full copyright and license information, please view the LICENSE
7: * file that was distributed with this source code.
8: *
9: * This file is part of the Nucleus package
10: */
11:
12: namespace Chromabits\Nucleus\Meditation\Constraints;
13:
14: use Chromabits\Nucleus\Meditation\Primitives\CompoundTypes;
15:
16: /**
17: * Class ArrayOfConstraint.
18: *
19: * @author Eduardo Trujillo <ed@chromabits.com>
20: * @package Chromabits\Nucleus\Meditation\Constraints
21: */
22: class ArrayOfConstraint extends LeftFoldableOfConstraint
23: {
24: /**
25: * Check the type of the traversable container.
26: *
27: * @param mixed $value
28: * @param array $context
29: *
30: * @return bool
31: */
32: protected function checkContainerType($value, $context = [])
33: {
34: return (new PrimitiveTypeConstraint(CompoundTypes::COMPOUND_ARRAY))
35: ->check($value, $context);
36: }
37: }
38: