Bytes::split()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 10
cc 2
nc 2
nop 1
crap 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
}