| Conditions | 4 |
| Paths | 8 |
| Total Lines | 37 |
| Lines | 37 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | function b_waiting_addresses() |
||
| 7 | { |
||
| 8 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 9 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 10 | $ret = []; |
||
| 11 | |||
| 12 | // addresses links |
||
| 13 | $block = []; |
||
| 14 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('addresses_links') . ' WHERE status=0'); |
||
|
|
|||
| 15 | if ($result) { |
||
| 16 | $block['adminlink'] = XOOPS_URL . '/modules/addresses/admin/index.php?op=listNewLinks'; |
||
| 17 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 18 | $block['lang_linkname'] = _PI_WAITING_LINKS; |
||
| 19 | } |
||
| 20 | $ret[] = $block; |
||
| 21 | |||
| 22 | // addresses broken |
||
| 23 | $block = []; |
||
| 24 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('addresses_broken')); |
||
| 25 | if ($result) { |
||
| 26 | $block['adminlink'] = XOOPS_URL . '/modules/addresses/admin/index.php?op=listBrokenLinks'; |
||
| 27 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 28 | $block['lang_linkname'] = _PI_WAITING_BROKENS; |
||
| 29 | } |
||
| 30 | $ret[] = $block; |
||
| 31 | |||
| 32 | // addresses modreq |
||
| 33 | $block = []; |
||
| 34 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('addresses_mod')); |
||
| 35 | if ($result) { |
||
| 36 | $block['adminlink'] = XOOPS_URL . '/modules/addresses/admin/index.php?op=listModReq'; |
||
| 37 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 38 | $block['lang_linkname'] = _PI_WAITING_MODREQS; |
||
| 39 | } |
||
| 40 | $ret[] = $block; |
||
| 41 | |||
| 42 | return $ret; |
||
| 43 | } |
||
| 44 |
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.