1 | <?php |
||
16 | class ProcessFactory |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $cmd; |
||
22 | |||
23 | /** |
||
24 | * ProcessFactory constructor |
||
25 | * |
||
26 | * @param string $cmd |
||
27 | */ |
||
28 | 11 | public function __construct($cmd) |
|
32 | |||
33 | /** |
||
34 | * @param \SplFileInfo|string $cwd |
||
35 | * @return Process |
||
36 | */ |
||
37 | 8 | public function make($cwd = null) |
|
45 | } |
||
46 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.