ProcessMemoryArea   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A isInRange() 0 4 2
1
<?php
2
3
/**
4
 * This file is part of the reliforp/reli-prof package.
5
 *
6
 * (c) sji <[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
declare(strict_types=1);
13
14
namespace Reli\Lib\Process\MemoryMap;
15
16
final class ProcessMemoryArea
17
{
18
    public function __construct(
19
        public string $begin,
20
        public string $end,
21
        public string $file_offset,
22
        public ProcessMemoryAttribute $attribute,
23
        public string $device_id,
24
        public int $inode_num,
25
        public string $name,
26
    ) {
27
    }
28
29
    public function isInRange(int $address): bool
30
    {
31
        return $address >= hexdec($this->begin)
32
            and $address <= hexdec($this->end);
33
    }
34
}
35