Bytes   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A split() 0 8 2
1
<?php declare(strict_types=1);
2
3
/**
4
* @package   s9e\RegexpBuilder
5
* @copyright Copyright (c) 2016-2022 The s9e authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\RegexpBuilder\Input;
9
10
class Bytes extends BaseImplementation
11
{
12
	/**
13
	* {@inheritdoc}
14
	*/
15 4
	public function split(string $string): array
16
	{
17 4
		if ($string === '')
18
		{
19 1
			return [];
20
		}
21
22 3
		return array_map('ord', str_split($string, 1));
23
	}
24
}