| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 4 | public function set(string $alias, ArrayAccess &$session, string $errorMessage, string $font = '/usr/share/fonts/truetype/freefont/FreeMono.ttf'): self |
|
| 18 | { |
||
| 19 | 4 | $this->font = $font; |
|
| 20 | 4 | $text = strtoupper($this->generateRandomString(8)); |
|
| 21 | |||
| 22 | 4 | $this->setEntry($alias, null, $text); |
|
| 23 | 4 | $this->fillSession($alias, $session, $text); |
|
| 24 | 4 | $this->setAttribute('id', $this->getKey()); |
|
| 25 | 4 | parent::addRule(IRules::SATISFIES_CALLBACK, $errorMessage, [$this, 'checkFillCaptcha']); |
|
| 26 | 4 | return $this; |
|
| 27 | } |
||
| 44 |