new Assert\Type('string'), 'depth' => new Assert\Type('int'), ]) ]) ]) ]); return $validator->validate($array, $constraints); } }