-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParserConfig.php
More file actions
78 lines (60 loc) · 1.56 KB
/
ParserConfig.php
File metadata and controls
78 lines (60 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
declare(strict_types=1);
namespace Bfabio\PublicCodeParser;
class ParserConfig
{
private bool $disableNetwork = false;
private bool $disableExternalChecks = false;
private string $branch = '';
private string $baseURL = '';
private int $httpTimeout = 0;
public function isNetworkDisabled(): bool
{
return $this->disableNetwork;
}
public function setDisableNetwork(bool $disableNetwork): self
{
$this->disableNetwork = $disableNetwork;
return $this;
}
public function areExternalChecksDisabled(): bool
{
return $this->disableExternalChecks;
}
public function setDisableExternalChecks(bool $disableExternalChecks): self
{
$this->disableExternalChecks = $disableExternalChecks;
return $this;
}
public function getBranch(): string
{
return $this->branch;
}
public function setBranch(string $branch): self
{
$this->branch = $branch;
return $this;
}
public function getBaseURL(): string
{
return $this->baseURL;
}
public function setBaseURL(string $url): self
{
$this->baseURL = $url;
return $this;
}
public function getHTTPTimeout(): int
{
return $this->httpTimeout;
}
/**
* @param int $seconds Maximum duration in seconds for each HTTP request.
* 0 means use the default (30s).
*/
public function setHTTPTimeout(int $seconds): self
{
$this->httpTimeout = $seconds;
return $this;
}
}