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

BucketRenderer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A renderBuckets() 0 6 1
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
}