Types   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAll() 0 13 1
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