PageRenderTime 27ms CodeModel.GetById 21ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/vendor/phpunit/phpunit/src/Util/Type.php

https://bitbucket.org/alan_cordova/api-sb-map
PHP | 41 lines | 24 code | 1 blank | 16 comment | 0 complexity | 610380000205632370a3c71985faf2dc MD5 | raw file
 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}