Passed
Push — master ( 8bcc81...ee584d )
by
unknown
03:48
created

Crawler   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 7

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 19 7
1
<?php
2
3
namespace App\Http\Controllers\VirtualCrawler;
4
5
use App\Http\Controllers\VirtualCrawler\CodeForces\CodeForces;
6
use App\Http\Controllers\VirtualCrawler\ContestHunter\ContestHunter;
7
use App\Http\Controllers\VirtualCrawler\POJ\POJ;
8
use App\Http\Controllers\VirtualCrawler\PTA\PTA;
9
use App\Http\Controllers\VirtualCrawler\Vijos\Vijos;
10
use App\Http\Controllers\VirtualCrawler\UVa\UVa;
11
use App\Models\ProblemModel;
12
use Auth;
13
14
class Crawler
15
{
16
17
    /**
18
     * Initial
19
     *
20
     * @return Response
0 ignored issues
show
Bug introduced by
The type App\Http\Controllers\VirtualCrawler\Response was not found. Did you mean Response? If so, make sure to prefix the type with \.
Loading history...
21
     */
22
    public function __construct($name, $action, $con, $cached=false)
23
    {
24
        if ($name=="CodeForces") {
25
            new CodeForces($action, $con, $cached);
26
        }
27
        if ($name=="ContestHunter") {
28
            new ContestHunter($action, $con, $cached);
29
        }
30
        if ($name=="POJ") {
31
            new POJ($action, $con, $cached);
32
        }
33
        if ($name=="PTA") {
34
            new PTA($action, $con, $cached);
35
        }
36
        if ($name=="Vijos") {
37
            new Vijos($action, $con, $cached);
38
        }
39
        if ($name=="UVa") {
40
            new UVa($action, $con, $cached);
41
        }
42
    }
43
}
44