Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
14 | |||
15 | /** |
||
16 | * @param string $parameterName |
||
17 | * @param mixed $value |
||
18 | * @param bool $itemType |
||
19 | * @return string |
||
20 | */ |
||
21 | 78 | public function testConditions($parameterName, $value, $itemType = false) |
|
22 | { |
||
23 | 78 | return sprintf('is_scalar($%1$s) && !preg_match(\'/%2$s/\', $%1$s)', $parameterName, addcslashes($value, '\'\\/')); |
|
24 | } |
||
37 |