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

Pixodrom   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 32
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B init() 0 24 1
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