Passed
Push — micro-opti-entityid-stuffz ( ca1ae8...81f418 )
by Leszek
03:49
created

HashArrayTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A arrayWrap() 0 8 1
1
<?php
2
3
namespace Wikibase\DataModel\Tests\HashArray;
4
5
/**
6
 * @covers Wikibase\DataModel\HashArray
7
 *
8
 * @group Wikibase
9
 * @group WikibaseDataModel
10
 * @group HashArray
11
 *
12
 * @license GPL-2.0+
13
 * @author Jeroen De Dauw < [email protected] >
14
 */
15
abstract class HashArrayTest extends \PHPUnit_Framework_TestCase {
16
17
	/**
18
	 * @param array $elements
19
	 *
20
	 * @return array[]
21
	 */
22
	protected function arrayWrap( array $elements ) {
23
		return array_map(
24
			function ( $element ) {
25
				return [ $element ];
26
			},
27
			$elements
28
		);
29
	}
30
31
}
32