| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function applyRule($parameterName, $value, $itemType = false) |
||
| 15 | { |
||
| 16 | $this->getMethod() |
||
| 17 | ->addChild('// validation for constraint: minInclusive') |
||
| 18 | ->addChild(sprintf('if ($%s < %d) {', $parameterName, $value)) |
||
| 19 | ->addChild($this->getMethod()->getIndentedString(sprintf('throw new \InvalidArgumentException(sprintf(\'Invalid value, the value must be superior or equal to %d\, "%%s" given\', %s), __LINE__);', $value, $parameterName), 1)) |
||
| 20 | ->addChild('}'); |
||
| 21 | return $this; |
||
| 22 | } |
||
| 23 | } |
||
| 24 |