EachPart   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A each() 0 2 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the Phootwork package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 *
7
 * @license MIT License
8
 * @copyright Thomas Gossmann
9
 */
10
namespace phootwork\lang\parts;
11
12
trait EachPart {
13
	/**
14
	 * Iterates the array and calls the callback function with the current item as parameter
15
	 *
16
	 * @param callable $callback
17
	 */
18 2
	public function each(callable $callback): void {
19 2
		array_map($callback, $this->array);
20
	}
21
}
22