1 | <?php |
||
2 | |||
3 | if (! is_array($storage_cache['dataset'])) { |
||
4 | $storage_cache['dataset'] = snmpwalk_cache_oid($device, 'datasetTable', null, 'FREENAS-MIB'); |
||
0 ignored issues
–
show
|
|||
5 | d_echo($storage_cache); |
||
6 | } |
||
7 | |||
8 | $entry = $storage_cache['dataset'][$storage['storage_index']]; |
||
9 | |||
10 | $storage['units'] = $entry['datasetAllocationUnits']; |
||
11 | $storage['size'] = ($entry['datasetSize'] * $storage['units']); |
||
12 | $storage['free'] = ($entry['datasetAvailable'] * $storage['units']); |
||
13 | $storage['used'] = ($storage['size'] - $storage['free']); |
||
14 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.