mirror of
https://github.com/Respect/Validation.git
synced 2024-06-14 11:35:08 +02:00
ab3732f91f
SPDX IDs are shorter than licensing notes previously used, and adhere better to FOSS standards. It is also machine-readable.
30 lines
535 B
PHP
30 lines
535 B
PHP
<?php
|
|
|
|
/*
|
|
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Respect\Validation\Rules;
|
|
|
|
use function is_object;
|
|
|
|
/**
|
|
* Validates whether the input is an object.
|
|
*
|
|
* @author Alexandre Gomes Gaigalas <alganet@gmail.com>
|
|
* @author Henrique Moody <henriquemoody@gmail.com>
|
|
*/
|
|
final class ObjectType extends AbstractRule
|
|
{
|
|
/**
|
|
* {@inheritDoc}
|
|
*/
|
|
public function validate($input): bool
|
|
{
|
|
return is_object($input);
|
|
}
|
|
}
|