Completed
Push — master ( 0943e7...2ac9d5 )
by Владислав
02:25
created

Socialink::init()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 31
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

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