FunCaptchaProxyless   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setWebsiteURL() 0 2 1
A getTaskSolution() 0 2 1
A getPostData() 0 6 1
A setTaskInfo() 0 2 1
A setJSSubdomain() 0 2 1
A setWebsitePublicKey() 0 2 1
1
<?php
2
namespace LaravelAnticaptcha\Anticaptcha;
3
4
class FunCaptchaProxyless extends Anticaptcha implements AntiCaptchaTaskProtocol {
5
6
    private $websiteUrl;
7
    private $jsSubdomain;
8
    private $websitePublicKey;
9
    
10
    public function getPostData() {
11
        return array(
12
            "type"                      =>  "FunCaptchaTaskProxyless",
13
            "websiteURL"                =>  $this->websiteUrl,
14
            "funcaptchaApiJSSubdomain"  =>  $this->jsSubdomain,
15
            "websitePublicKey"          =>  $this->websitePublicKey
16
        );
17
    }
18
    
19
    public function setTaskInfo($taskInfo) {
20
        $this->taskInfo = $taskInfo;
21
    }
22
    
23
    public function getTaskSolution() {
24
        return $this->taskInfo->solution->token;
25
    }
26
    
27
    public function setWebsiteURL($value) {
28
        $this->websiteUrl = $value;
29
    }
30
    
31
    public function setJSSubdomain($value) {
32
        $this->jsSubdomain = $value;
33
    }
34
    
35
    public function setWebsitePublicKey($value) {
36
        $this->websitePublicKey = $value;
37
    }
38
    
39
    
40
}
41