| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 14 | public function __construct($type, $title, $data) |
|
| 33 | { |
||
| 34 | 14 | $this->type = $type; |
|
| 35 | |||
| 36 | 14 | $this->validateTitleSize($title); |
|
| 37 | 13 | $this->title = $title; |
|
| 38 | |||
| 39 | 13 | if ($this->type === self::TYPE_POSTBACK) { |
|
| 40 | 5 | $this->validatePayload($data); |
|
| 41 | 4 | } |
|
| 42 | |||
| 43 | 12 | $this->data = $data; |
|
| 44 | 12 | } |
|
| 45 | |||
| 115 |