Checks if the types of the passed arguments in a function/method call are compatible.
1 | <?php |
||
2 | |||
3 | echo '<table class="table table-hover table-condensed"> |
||
4 | <thead> |
||
5 | <tr> |
||
6 | <th>Local Port</th> |
||
7 | <th>Remote Device</th> |
||
8 | <th>Remote Port</th> |
||
9 | <th>Protocol</th> |
||
10 | </tr> |
||
11 | </thead>'; |
||
12 | |||
13 | foreach (dbFetchRows('SELECT * FROM links AS L, ports AS I WHERE I.device_id = ? AND I.port_id = L.local_port_id order by ifName', [$device['device_id']]) as $neighbour) { |
||
14 | $neighbour = cleanPort($neighbour); |
||
15 | echo '<td>' . generate_port_link($neighbour) . '<br>' . $neighbour['ifAlias'] . '</td>'; |
||
16 | if (is_numeric($neighbour['remote_port_id']) && $neighbour['remote_port_id']) { |
||
17 | $remote_port = cleanPort(get_port_by_id($neighbour['remote_port_id'])); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
18 | $remote_device = device_by_id_cache($remote_port['device_id']); |
||
19 | echo '<td>' . generate_device_link($remote_device) . '<br>' . $remote_device['hardware'] . '</td> |
||
20 | <td>' . generate_port_link($remote_port) . '<br>' . $remote_port['ifAlias'] . '</td>'; |
||
21 | } else { |
||
22 | echo '<td>' . $neighbour['remote_hostname'] . '<br>' . $neighbour['remote_platform'] . '</td> |
||
23 | <td>' . $neighbour['remote_port'] . '</td>'; |
||
24 | } |
||
25 | echo '<td>' . strtoupper($neighbour['protocol']) . '</td></tr>'; |
||
26 | } |
||
27 | echo '</table>'; |
||
28 |