Conditions | 5 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
29 | public function getIterator() |
||
30 | { |
||
31 | /** |
||
32 | * @var string $full_path |
||
33 | * @var \SplFileInfo $item |
||
34 | */ |
||
35 | foreach (new \GlobIterator('/proc/*/cmdline') as $full_path => $item) { |
||
36 | if (file_exists($full_path) === false) { |
||
37 | continue; |
||
38 | } |
||
39 | $command_line = $this->file_reader->readAll($full_path); |
||
40 | if ($command_line === '') { |
||
41 | continue; |
||
42 | } |
||
43 | if (!is_numeric(basename($item->getPath()))) { |
||
44 | continue; |
||
45 | } |
||
46 | yield (int)basename($item->getPath()) => $command_line; |
||
47 | } |
||
50 |