Serializable::getInt()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitWasp\Bitcoin;
6
7
abstract class Serializable implements SerializableInterface
8
{
9
    /**
10
     * @return string
11
     */
12 113
    public function getHex(): string
13
    {
14 113
        return $this->getBuffer()->getHex();
15
    }
16
17
    /**
18
     * @return string
19
     */
20 5443
    public function getBinary(): string
21
    {
22 5443
        return $this->getBuffer()->getBinary();
23
    }
24
25
    /**
26
     * @return int
27
     */
28 40
    public function getInt()
29
    {
30 40
        return $this->getBuffer()->getInt();
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getBuffer()->getInt() also could return the type string which is incompatible with the documented return type integer.
Loading history...
31
    }
32
}
33