Bin   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toHex() 0 4 1
A toStr() 0 4 1
1
<?php
2
3
namespace FForattini\Btrieve;
4
5
class Bin
6
{
7
    /**
8
     * Converts Binary to Hexadecimal.
9
     *
10
     * @param string $bin
11
     *
12
     * @return string
13
     */
14
    public static function toHex($bin)
15
    {
16
        return bin2hex($bin);
17
    }
18
19
    /**
20
     * Converts Binary to ASCII.
21
     *
22
     * @param string $bin
23
     *
24
     * @return string
25
     */
26
    public static function toStr($bin)
27
    {
28
        return Hex::toStr(self::toHex($bin));
29
    }
30
}
31