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

Bencode::decodeInteger()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 4
eloc 5
c 2
b 0
f 0
nc 4
nop 0
dl 0
loc 11
rs 10
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
}