1<?php
2/*
3 * This file is part of PHPUnit.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
9 */
10
11/**
12 * Utility class for textual type (and value) representation.
13 */
14class PHPUnit_Util_Type
15{
16    /**
17     * @param string $type
18     *
19     * @return bool
20     */
21    public static function isType($type)
22    {
23        return in_array(
24            $type,
25            [
26                'numeric',
27                'integer',
28                'int',
29                'float',
30                'string',
31                'boolean',
32                'bool',
33                'null',
34                'array',
35                'object',
36                'resource',
37                'scalar'
38            ]
39        );
40    }
41}
42