respect-validation/library/Rules/ArrayType.php
2018-03-16 11:19:14 +01:00

32 lines
665 B
PHP

<?php
/*
* This file is part of Respect/Validation.
*
* (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
*
* For the full copyright and license information, please view the "LICENSE.md"
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Respect\Validation\Rules;
/**
* Validates whether the type of an input is array.
*
* @author Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
* @author Henrique Moody <henriquemoody@gmail.com>
*/
final class ArrayType extends AbstractRule
{
/**
* {@inheritdoc}
*/
public function validate($input): bool
{
return is_array($input);
}
}