Completed
Branch master (411689)
by Josh
02:00
created

Bencode::getSafeBoundary()   B

Complexity

Conditions 7
Paths 6

Size

Total Lines 17
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 7
eloc 8
c 0
b 0
f 0
nc 6
nop 2
dl 0
loc 17
rs 8.8333
1
<?php declare(strict_types=1);
2
3
/**
4
* @package   s9e\Bencode
5
* @copyright Copyright (c) 2014-2020 The s9e authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\Bencode;
9
10
class Bencode
11
{
12 60
	public static function decode(string $bencoded)
13
	{
14 60
		return Decoder::decode($bencoded);
15
	}
16
17 14
	public static function encode($value): string
18
	{
19 14
		return Encoder::encode($value);
20
	}
21
}