StringParamTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A valueProvider() 0 18 1
A getType() 0 3 1
1
<?php
2
3
namespace ParamProcessor\Tests\Integration\Definitions;
4
5
/**
6
 * @licence GNU GPL v2+
7
 * @author Jeroen De Dauw < [email protected] >
8
 */
9
class StringParamTest extends ParamDefinitionTest {
10
11
	/**
12
	 * @see ParamDefinitionTest::valueProvider
13
	 *
14
	 * @param boolean $stringlyTyped
15
	 *
16
	 * @return array
17
	 */
18
	public function valueProvider( $stringlyTyped = true ) {
19
		return [
20
			'empty' => [
21
				[ 'ohi there', true, 'ohi there' ],
22
				[ 4.2, false ],
23
				[ [ 42 ], false ],
24
			],
25
			'values' => [
26
				[ 'foo', true, 'foo' ],
27
				[ '1', true, '1' ],
28
				[ 'yes', true, 'yes' ],
29
				[ 'bar', false ],
30
				[ true, false ],
31
				[ 0.1, false ],
32
				[ [], false ],
33
			],
34
		];
35
	}
36
37
	/**
38
	 * @see ParamDefinitionTest::getType
39
	 * @return string
40
	 */
41
	public function getType() {
42
		return 'string';
43
	}
44
45
}
46