Completed
Push — master ( 0751b1...5b620b )
by Владислав
02:10
created

Pixodrom::init()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 24
rs 8.9713
cc 1
eloc 18
nc 1
nop 0
1
<?php
2
3
namespace jumper423\decaptcha\services;
4
5
/**
6
 * Class Pixodrom
7
 * @package jumper423\decaptcha\services
8
 */
9
class Pixodrom extends RuCaptcha
10
{
11
    public $domain = 'captcha24.com';
12
13
    const ACTION_FIELD_IS_RUSSIAN = 17;
14
    const ACTION_FIELD_LABEL = 18;
15
16
    public function init()
17
    {
18
        parent::init();
19
20
        unset(
21
            $this->paramsNames[self::ACTION_FIELD_LANGUAGE],
22
            $this->paramsNames[self::ACTION_FIELD_QUESTION],
23
            $this->paramsNames[self::ACTION_FIELD_TEXTINSTRUCTIONS],
24
            $this->paramsNames[self::ACTION_FIELD_PINGBACK],
25
            $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][self::ACTION_FIELD_LANGUAGE],
26
            $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][self::ACTION_FIELD_QUESTION],
27
            $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][self::ACTION_FIELD_TEXTINSTRUCTIONS],
28
            $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][self::ACTION_FIELD_PINGBACK]
29
        );
30
        $this->paramsNames[self::ACTION_FIELD_IS_RUSSIAN] = 'is_russian';
31
        $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_IS_RUSSIAN] = [
32
            static::PARAM_SLUG_DEFAULT => 0,
33
            static::PARAM_SLUG_TYPE => static::PARAM_FIELD_TYPE_INTEGER,
34
        ];
35
        $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_LABEL] = [
36
            static::PARAM_SLUG_TYPE => static::PARAM_FIELD_TYPE_STRING,
37
        ];
38
        $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][self::ACTION_FIELD_SOFT_ID][self::PARAM_SLUG_DEFAULT] = 0;
39
    }
40
}
41