Socialink::init()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 50

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 50
rs 9.0909
c 0
b 0
f 0
cc 1
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[static::ACTION_FIELD_QUESTION],
17
            $this->paramsNames[static::ACTION_FIELD_INSTRUCTIONS],
18
            $this->paramsNames[static::ACTION_FIELD_PINGBACK],
19
            $this->paramsNames[static::ACTION_FIELD_LANG],
20
            $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_QUESTION],
21
            $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_INSTRUCTIONS],
22
            $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_PINGBACK],
23
            $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_LANG]
24
        );
25
        $this->paramsNames[static::ACTION_FIELD_IS_RUSSIAN] = 'is_russian';
26
        $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_IS_RUSSIAN] = [
27
            static::PARAM_SLUG_DEFAULT => 0,
28
            static::PARAM_SLUG_TYPE    => static::PARAM_FIELD_TYPE_INTEGER,
29
            static::PARAM_SLUG_ENUM    => [
30
                0,
31
                1,
32
            ],
33
        ];
34
        $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_NUMERIC][static::PARAM_SLUG_ENUM] = [
35
            0,
36
            1,
37
        ];
38
        $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_LANGUAGE][static::PARAM_SLUG_ENUM] = [
39
            0,
40
            1,
41
            2,
42
        ];
43
        $this->actions[static::ACTION_RECOGNIZE][static::ACTION_FIELDS][static::ACTION_FIELD_SOFT_ID][static::PARAM_SLUG_DEFAULT] = 0;
44
45
        $this->wiki->setText(['menu', 'from_service'], null);
46
47
        $this->wiki->setText(['service', 'name'], 'SociaLink');
48
        $this->wiki->setText(['service', 'href'], 'http://www.socialink.ru/?key=84333');
49
        $this->wiki->setText(['service', 'desc'], [
50
            'ru' => 'Распознавание капч, капчи на русском языке, в любое время суток, начисление заработка в онлайне',
51
            'en' => 'Recognition of captcha, captcha in Russian, at any time of the day, the accrual of earnings online',
52
        ]);
53
        $this->wiki->setText(['recognize', 'price'], [
54
            'ru' => 'От 18 до 44 руб. за 1000 капч в зависимости от нагрузки',
55
            'en' => 'Starting from 0.5 USD for 1000 solved CAPTCHAs',
56
        ]);
57
        $this->wiki->setText(['recognize', 'desc'], [
58
            'ru' => 'Расшифровка капч с картики. Необходимо указать файл с картинкой или ссылку на него.',
59
            'en' => 'Decrypt the captcha with image. You must specify a file with a picture or a link to it.',
60
        ]);
61
    }
62
}
63