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

Bencode::encodeArrayObject()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 7
c 0
b 0
f 0
nc 2
nop 1
dl 0
loc 13
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 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
}