1 | <?php |
||
11 | class Exec |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | const REDIRECT_STDERR_TO_STDOUT = ' 2>&1'; |
||
17 | |||
18 | /** |
||
19 | * @var int (0-255) |
||
20 | */ |
||
21 | const CODE_CLEAN_EXIT = 0; |
||
22 | |||
23 | /** |
||
24 | * @param string $command |
||
25 | * @param string $commandOutput |
||
|
|||
26 | * @param int $returnCode |
||
27 | */ |
||
28 | public static function run($command, &$commandOutput = null, &$returnCode = null) |
||
39 | |||
40 | /** |
||
41 | * Exec class is allowed to run |
||
42 | * |
||
43 | * @return bool |
||
44 | */ |
||
45 | public static function allowed() |
||
49 | |||
50 | /** |
||
51 | * @param $commandOutput |
||
52 | * @return string |
||
53 | */ |
||
54 | private static function parseCommandOutput($commandOutput) |
||
58 | } |
||
59 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.