Passed
Push — 0.6.x ( 9a1948...a98caa )
by Shinji
03:23 queued 01:32
created

Elf64SymbolTable::findAll()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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\Elf\Structure\Elf64;
15
16
final class Elf64SymbolTable
17
{
18
    public const STN_UNDEF = 0;
19
20
    /** @var Elf64SymbolTableEntry[] */
21
    private array $entries;
22
23
    public function __construct(Elf64SymbolTableEntry ...$entries)
24
    {
25
        $this->entries = $entries;
26
    }
27
28
    public function lookup(int $index): Elf64SymbolTableEntry
29
    {
30
        return $this->entries[$index];
31
    }
32
33
    /**
34
     * @return Elf64SymbolTableEntry[]
35
     */
36
    public function findAll(): array
37
    {
38
        return $this->entries;
39
    }
40
}
41