Types::getAll()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Phive Queue package.
5
 *
6
 * (c) Eugene Leonovich <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Phive\Queue\Tests\Queue;
13
14
class Types
15
{
16
    const TYPE_NULL = 1;
17
    const TYPE_BOOL = 2;
18
    const TYPE_INT = 3;
19
    const TYPE_FLOAT = 4;
20
    const TYPE_STRING = 5;
21
    const TYPE_BINARY_STRING = 6;
22
    const TYPE_ARRAY = 7;
23
    const TYPE_OBJECT = 8;
24
25
    public static function getAll()
26
    {
27
        return [
28
            self::TYPE_NULL => null,
29
            self::TYPE_BOOL => true,
30
            self::TYPE_INT => 42,
31
            self::TYPE_FLOAT => 1.5,
32
            self::TYPE_STRING => 'string',
33
            self::TYPE_BINARY_STRING => "\x04\x00\xa0\x00\x00",
34
            self::TYPE_ARRAY => ['a', 'r', 'r', 'a', 'y'],
35
            self::TYPE_OBJECT => new self(),
36
        ];
37
    }
38
}
39