Completed
Push — master ( 5ae4a2...59971b )
by Gabriel
64:03
created

BucketRenderer::renderBuckets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\Fundraising\Frontend\Presentation;
6
7
use WMDE\Fundraising\Frontend\BucketTesting\Bucket;
8
9
/**
10
 * Prepares a list of buckets into template variables
11
 * @license GNU GPL v2+
12
 */
13
class BucketRenderer {
14
15
	public static function renderBuckets( Bucket ...$buckets ): array {
16
		return array_map(
17
			function ( Bucket $b ) {
18
				return $b->getId();
19
			},
20
			$buckets
21
		);
22
	}
23
24
}