Passed
Push — master ( b45126...8af3f1 )
by 世昌
03:18
created

DebugObjectContext   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isObjectExported() 0 3 1
A setObjectIsExported() 0 3 1
1
<?php
2
3
4
namespace suda\framework\debug;
5
6
class DebugObjectContext
7
{
8
9
    /**
10
     * @var array
11
     */
12
    protected $object = [];
13
14
    /**
15
     * @param string $objectHash
16
     * @return bool
17
     */
18
    public function isObjectExported(string $objectHash)
19
    {
20
        return in_array($objectHash, $this->object);
21
    }
22
23
    public function setObjectIsExported(string $objectHash)
24
    {
25
        $this->object [] = $objectHash;
26
    }
27
}
28