1 | <?php |
||
8 | class SleepUsage extends AbstractFunctionCallAnalyzer |
||
9 | { |
||
10 | const DESCRIPTION = 'Checks for use of different sleep functions which can lead to a DoS vulnerability.'; |
||
11 | |||
12 | /** |
||
13 | * @var array different sleep functions |
||
14 | */ |
||
15 | protected $map = [ |
||
16 | 'sleep' => 'sleep', |
||
17 | 'usleep' => 'usleep', |
||
18 | 'time_nanosleep' => 'time_nanosleep', |
||
19 | 'time_sleep_until' => 'time_sleep_until' |
||
20 | ]; |
||
21 | |||
22 | 1 | public function pass(FuncCall $funcCall, Context $context) |
|
37 | } |
||
38 |