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

Crawler::__construct()   B

Complexity

Conditions 7
Paths 64

Size

Total Lines 19
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 7
eloc 12
nc 64
nop 4
dl 0
loc 19
rs 8.8333
c 0
b 0
f 0
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