Block::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace mattvb91\TronTrx;
4
5
/**
6
 * Class Block
7
 * @package mattvb91\TronTrx
8
 */
9
class Block
10
{
11
    public $blockID;
12
    public $block_header;
13
14
    public function __construct(string $blockID, \stdClass $block_header)
15
    {
16
        if (!strlen($blockID)) {
17
            throw new \Exception('blockID empty');
18
        }
19
20
        $this->blockID = $blockID;
21
        $this->block_header = $block_header;
22
    }
23
24
25
}