mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 00:32:16 +02:00
ef8a8f4b27
There is no need for that file to be a Markdown, and it can be a plain text file. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
36 lines
789 B
PHP
36 lines
789 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 file
|
|
* that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Respect\Validation\Rules;
|
|
|
|
use function is_array;
|
|
|
|
/**
|
|
* Validates whether the type of an input is array.
|
|
*
|
|
* @author Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
|
|
* @author Emmerson Siqueira <emmersonsiqueira@gmail.com>
|
|
* @author Henrique Moody <henriquemoody@gmail.com>
|
|
* @author João Torquato <joao.otl@gmail.com>
|
|
*/
|
|
final class ArrayType extends AbstractRule
|
|
{
|
|
/**
|
|
* {@inheritDoc}
|
|
*/
|
|
public function validate($input): bool
|
|
{
|
|
return is_array($input);
|
|
}
|
|
}
|