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

Socialink   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

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