Completed
Push — 2.0/master ( 68076f...9cf05b )
by Josh
01:40
created

Bencode::decodeDigits()   A

Complexity

Conditions 5
Paths 5

Size

Total Lines 24
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 5
eloc 11
c 1
b 0
f 0
nc 5
nop 1
dl 0
loc 24
rs 9.6111
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
	public static function decode(string $bencoded)
13
	{
14
		return Decoder::decode($bencoded);
15
	}
16
17
	public static function encode($value): string
18
	{
19
		return Encoder::encode($value);
20
	}
21
}