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